LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Identify hard disk drives during Linux installation (https://www.linuxquestions.org/questions/linux-newbie-8/identify-hard-disk-drives-during-linux-installation-665700/)

thelink123 08-27-2008 02:48 AM

Identify hard disk drives during Linux installation
 
Hi,

In windows the drives are generally named as c: d: etc. So i can easily identify the drives during installation. My question is how will identify c: drive in Linux. Because it will be given as hda1 or sda1 i may be installing the Linux in the wrong drive than i intended. So please tell me how i will map the c: d: e: etc drives to hda1 ,hda2 etc.

thanks,
thelink123

jschiwal 08-27-2008 04:52 AM

Calling C: and D: drives is a misnomer. They might be drives or might just be partitions. Also, suppose you have one disk drive. Then C: is the first partition and D: is the second. But if you add a drive, D: now is the first partition on the second drive. The letters are just arbitrary aliases. In XP, the drives and partitions are actually identified like: multi(0)disk(0)rdisk(0)partition(1). Just look at your boot.ini file to see for yourself.

On newer kernels, only sd<letter><number> is used to identify partitions. The first disk drive is /dev/sda, the second is /dev/sdb. The hard drives are ordered by the letter. The number is the partition number on a hard drive. So if C: is the first drive and has a single partition, and D: is the second drive, then this corresponds with /dev/sda and /dev/sdb respectively.

Most distro's have a graphical disk partitioning program based on gparted. It will show each drive and the partitions on them. If the filesystems on the Windows partitions have labels, they may show up as well.

You can also enter "ctrl-alt-f2" ( on some systems the shell is on a different virtual terminal ) and mount and explore the partitions if you aren't sure.

Also, if you resize on of the partitions to make room for Linux, then simply choose the empty space to install the linux partitions. You will need at least two Linux partition. One for swap and one for the root directory (/). However, if you are installing Fedora Core, it uses lvm2 and needs a separate /boot partition as well. It is also advisable to have a separate partition for /home as well. Then if you decide to change distro's you can reuse the /home partition and keep your files. I've done this, renaming my /home/<username> directory first; i.e. /home/jschiwal -> /home/jschiwal-old. After a fresh install, I copied the files I wanted to keep to my new home directory and deleted the rest.
So, one recommendation is /boot, swap, / and /home.

The /boot partition only needs to be around 50MB. For modern desktops with 2GB or more of memory, I wouldn't bother with the 2xram rule of thumb for the size of the swap file. However you may need to hava just over 1x ram for suspend to disk to work. The ram used will be saved to the swap file when you suspend.

syg00 08-27-2008 05:05 AM

This is a real problem for which there is no easy (foolproof) solution. An experienced user can easily move around (as suggested) to assure themselves. Accidents still happen.
New users have a much harder job.

For myself, I never install more than one drive of a specific size on a system - then I have some chance of recognising I may be hitting the wrong disk before damage is done (I might have a 80 Gig and a 120 Gig drive, but never two 80 Gig drives on the one system).
Like I said, no easy "for everyone" solution.


All times are GMT -5. The time now is 10:13 AM.