Identify hard disk drives during Linux installation
Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.