LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-06-2010, 06:04 PM   #1
cK`
LQ Newbie
 
Registered: Apr 2010
Location: Orange
Distribution: Unbuntu Server 9.10
Posts: 28

Rep: Reputation: 15
Cannot login, need fresh start (reformat two hard drives) *server edition*


Hey,

I recently aquired server with TWO hard drives.

For reason unknown (hehe) i installed unbuntu server on both hard drives.

This is causeing me some problems, and i would like to wipe everything and start over,


I would like to put unbuntu server on one hard drive and use the other for free space.


P.S I have had Unbuntu server run succsessfully i am just unclear on how to clear a hard drive of any OS.

Oh did i mention the first time i used linux was 3 days ago? Ye i am a newby (sigh)


Any help would be much appreciated!

Thanks!!

Last edited by cK`; 04-06-2010 at 06:05 PM.
 
Old 04-06-2010, 06:45 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 17,919

Rep: Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689
Quote:
Originally Posted by cK` View Post
Hey,
I recently aquired server with TWO hard drives.

For reason unknown (hehe) i installed unbuntu server on both hard drives.
This is causeing me some problems, and i would like to wipe everything and start over,
I would like to put unbuntu server on one hard drive and use the other for free space.

P.S I have had Unbuntu server run succsessfully i am just unclear on how to clear a hard drive of any OS.

Oh did i mention the first time i used linux was 3 days ago? Ye i am a newby (sigh)
Any help would be much appreciated!
Thanks!!
You put the CD/DVD in as you did the first time, and follow the instructions on screen. When it asks if you want to format/reformat the drive(s), say YES. That's pretty much it. And that goes for any distro of Linux, not just Ubuntu.
 
Old 04-06-2010, 07:32 PM   #3
cK`
LQ Newbie
 
Registered: Apr 2010
Location: Orange
Distribution: Unbuntu Server 9.10
Posts: 28

Original Poster
Rep: Reputation: 15
Wouldn't that only allow me to reformat one hard drive? I want to take unbuntu server off both hard drives and only reinstall it to one and use the other one for storage.
 
Old 04-06-2010, 07:37 PM   #4
cK`
LQ Newbie
 
Registered: Apr 2010
Location: Orange
Distribution: Unbuntu Server 9.10
Posts: 28

Original Poster
Rep: Reputation: 15
Wouldn't that only allow me to reformat one hard drive. I want to take unbuntu server off both hard drives and only reinstall it to one and use the other one for storage.
 
Old 04-06-2010, 07:42 PM   #5
backblaze.pl
LQ Newbie
 
Registered: Apr 2010
Distribution: Slackware
Posts: 23

Rep: Reputation: 6
I think you lack basic concept of Linux (Unix) filesystem organization.

First of all - as you may have noticed - there are no drive letters. Instead, there is a filesystem tree, starting at "/" (pronounced "root") directory.

Root directory resides on root device (usually partition, but it can be whole disk, floppy disk, ram-disk, raid partition, dynamic volume (LVM or EVMS), or similar).

Exercise 1: To quickly find out on what device your root filesystem resides, type this in a terminal window:
Code:
df -h /
Linux gives you full access to all the stuff mentioned above via handles in /dev directory. Having necessary permissions you can dump, view, zero, format or even edit your drives directly. So be extremely careful when visiting /dev directory as root.

Exercise 2:
Code:
hexdump -Cn 200 /dev/sda
Naming conventions are pretty simple:
  • /dev/hdx refers to IDE drives and CD/DVD/BD devices (and sATA drives in legacy mode)
  • /dev/sdx means SCSI disks (including sATA, USB drives and pen drives and anything using SCSI protocol
  • /dev/mdn refers to MD (software RAID) devices
"x" are letters "a", "b", "c"... etc for subsequent drives, "n" = 0, 1, 2, 3...

As you may already know, disks partitioned in DOS-compatible style can have up to 4 primary partitions of which one can be extended partition, containing any number of logical drives. Therefore numbers 1-4 immediately following hdx/sdx in device name are reserved for primary partitions, while 5 and above denote logical drives.

So /dev/hda1 would be "first primary partition on primary master ide drive" while /dev/sdj8 would be "fourth logical drive on tenth scsi drive"

Note: SCSI devices are enumerated in order they are detected by kernel. MD device numbers are user-definable.

Very important note: Partitions are enumerated in partition table order and logical disks chain order, NOT in order of space they physically occupy on disk.

The simplest yet sufficient tool to repartition drives in Linux is called fdisk.

Exercise 3: To list partitions on all devices in your system, simply type
Code:
fdisk -l
Exercise 4: Compare output of commands:
Code:
fdisk -l
mount
df -h
ls -l /dev/[hms]d*
So when hard drive is partitioned and formatted, one usually picks a partition to be his(/her) root partition. Other partitions are mounted in some directory of directory tree.

Example 1:
Suppose you have two disks: /dev/sda with 4 primary partitions and /dev/sdb formatted as whole device (not partitioned at all) - you can do this in Linux. And let /dev/sda3 be your root partition, containing following directories:
  • /bin
  • /boot
  • /etc
  • /home
  • /usr
Suppose /dev/sda2 contains following directories:
  • alice
  • bob
  • charlie
Now you may decide to mount /dev/sda1 under /boot, /dev/sda2 under /home, and /dev/sda4 under /usr. After that your directory tree will look like this:
  • /bin
  • /boot
  • /etc
  • /home
  • /home/alice
  • /home/bob
  • /home/charlie
  • /usr
As you can see, directories from /dev/sda2 partition became visible under /home directory. And this happen always when you 'mount' device under directory (mount point) - mount point's contents became covered (hidden) and contents of freshly mounted partition becomes visible instead.

At this point you may decide to mount /dev/sdb under /home/charlie, giving Charlie access to full, unpartitioned second drive.

Exercise 5: Where will go files (to which partition) written to every directory listed above?
Answer:
  • Files written to /home/charlie will go to /dev/sdb
  • Files written to /home/alice, /home/bob and /home will go to /dev/sda2
  • Files written to /usr will go to /dev/sda4
  • Files written to /boot will go to /dev/sda1
  • Files written anywhere else will end up in your root partition, /dev/sda3

Having read all this, there is no point in reformatting/reinstalling system. Just move files between partitions to get desired setup. It's easier, safer, faster, more controllable.

Take care.
 
1 members found this post helpful.
Old 04-06-2010, 08:28 PM   #6
nonamenobody
Member
 
Registered: Oct 2002
Posts: 138

Rep: Reputation: 22
Quote:
Originally Posted by cK` View Post
Wouldn't that only allow me to reformat one hard drive? I want to take unbuntu server off both hard drives and only reinstall it to one and use the other one for storage.
A reinstall, as TBOne says would undoubtedly be the quickest and simplest way to achieve what you want - given your current level of knowledge and understanding (and the speed of installation).

It doesn't matter that only one hard drive will be reformatted. The important thing is that your entire system will be on that drive. You can then reformat or repartition the other hard drive at will.

However you may want to try backblaze.pl's suggestions, you may well learn quite a lot quite quickly. If you find that the learning curve is too steep, you can always revert to the easier option. A lot depends on how your system was setup - I don't know what Ubuntu (server edition or not) does when you tell it to use two hard drives. If it is using RAID or LVM, backblaze's suggestions (although very comprehensive) won't get you there (though they may well help you along the way).
 
Old 04-06-2010, 09:04 PM   #7
backblaze.pl
LQ Newbie
 
Registered: Apr 2010
Distribution: Slackware
Posts: 23

Rep: Reputation: 6
Yeah, cK`, do not hesitate to ask - someone can help you. Now as you know all these fascinating tools, you may post the output of all exercises to give us closer look at your configuration. And tell us - what do you mean by 'cannot login'? ;-)
 
Old 04-06-2010, 09:15 PM   #8
cK`
LQ Newbie
 
Registered: Apr 2010
Location: Orange
Distribution: Unbuntu Server 9.10
Posts: 28

Original Poster
Rep: Reputation: 15
Thanks you this above post is helpful.

While reading this post i was in the middle of reinstalling unbuntu, so after reading i went back to the partition guide in the install menu. And this is what i did from my newly found knowledge.

I defaulted partitioned SCSI3 (First Hard Drive on the List)
And it did this,
It Set up "\" at SCSI3 Partition #1 as primary data,
It then Put a very small amount of "swap" space at Partition #2 of SCSI3 as logical data.

Now for SCSI4 (Second hard drive on this list)

I set it up as "free space"



So what i conclude from this is that SCSI3 is going to be the hard drive that everything is going to go on.

SCSI4 is just their but not being used (Waiting to be Partitioned by Fdisc).

Am i correct? Did i do what i think i did? Did it wipe all the Data off of SCSI3 and install a fresh copy of Unbuntu to SCSI4?

If so i will begin to better understand the above post so i can customize the second hard disc

Thanks!

Last edited by cK`; 04-06-2010 at 09:18 PM.
 
Old 04-06-2010, 09:35 PM   #9
backblaze.pl
LQ Newbie
 
Registered: Apr 2010
Distribution: Slackware
Posts: 23

Rep: Reputation: 6
So SCSI3 would be /dev/sda
SCSI4=/dev/sdb

/dev/sda1 --> /
/dev/sda5 --> (swap)

To check if your system uses anything else, do Exercise 1. You shouldn't see any "sdb"'s there, just "sda"'s, meaning that /dev/sda is in use while /dev/sdb is left alone.
 
Old 04-06-2010, 10:02 PM   #10
cK`
LQ Newbie
 
Registered: Apr 2010
Location: Orange
Distribution: Unbuntu Server 9.10
Posts: 28

Original Poster
Rep: Reputation: 15
Thank you this is extremely helpful.


There is a reason for me doing all this, and i am excited to see if i can figure out my Root problem

Along time ago in a fair away land(yesturday) my server was working basically how i wanted it to. But the problem started when i wanted to tunnel webmin through SSH.

I had webmin installed successfully before, i followed same directions i did the first time to install it again but this time it would not have it.

I think (though i dont know) that it has something to do with webmin being on both hard drives. Or One hard drive was trying to access the webmin file on the other hard drive and could not.

I really dont know all i know is it used to let me install webmin but it does not anymore.

So then i decided i would just wipe both hard drives and start over.

So now i am here starting over hoping it works.

But i am expecting i will have the same problem.


I will attempt to install webmin as soon as my machine is done installing my OS.

After that i will most likely be back trying to trouble shoot this issue.


Thanks for all your help this was very useful for me.
 
Old 04-06-2010, 10:04 PM   #11
cK`
LQ Newbie
 
Registered: Apr 2010
Location: Orange
Distribution: Unbuntu Server 9.10
Posts: 28

Original Poster
Rep: Reputation: 15
Thank you this is extremely helpful.


There is a reason for me doing all this, and i am excited to see if i can figure out my Root problem

Along time ago in a fair away land(yesturday) my server was working basically how i wanted it to. But the problem started when i wanted to tunnel webmin through SSH.

I had webmin installed successfully before, i followed same directions i did the first time to install it again but this time it would not have it.

I think (though i dont know) that it has something to do with webmin being on both hard drives. Or One hard drive was trying to access the webmin file on the other hard drive and could not.

I really dont know all i know is it used to let me install webmin but it does not anymore.

So then i decided i would just wipe both hard drives and start over.

So now i am here starting over hoping it works.

But i am expecting i will have the same problem.


I will attempt to install webmin as soon as my machine is done installing my OS.

After that i will most likely be back trying to trouble shoot this issue.

Well the first thing i am going to do is make shur its not trying to read data from my other hard drive!! =)

Thanks for all your help this was very useful for me.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Which edition (desktop edition or Server edition) best for Oracle RAC on vm thmsvng Linux - Virtualization and Cloud 2 11-26-2009 05:13 PM
Can we fill 99% of hard desk in Ubuntu Linux 7.0 server edition jayarajmohan Ubuntu 3 09-01-2009 04:16 AM
Can SME server or CentOS server use the 1Tb or 1.5 Tb sata hard drives? mindsgoneawol Linux - Hardware 3 10-18-2008 09:00 PM
Formatting A Hard Drive Free From Data And Partitions, Fresh Start, How Is It Done? Novatian Linux - Hardware 5 05-11-2008 11:15 PM
X Server Won't Start on Fresh Install Thray Debian 4 04-04-2004 06:28 PM


All times are GMT -5. The time now is 12:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration