LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Cannot cohabit hda & sda specified partitions on the same hard drive (https://www.linuxquestions.org/questions/linux-newbie-8/cannot-cohabit-hda-and-sda-specified-partitions-on-the-same-hard-drive-943031/)

mike99 05-03-2012 12:54 AM

Cannot cohabit hda & sda specified partitions on the same hard drive
 
I'm thinking this has something to do with GRUB. But, i cannot cohabit hda & sda partitions on the same hard drive. I am hoping it is just a line entry to modify in GRUB. I think the Linux kernel in the distro being installed determines if it is called a hda or a sda. Thanx 4the help!

jschiwal 05-03-2012 01:03 AM

I don't understand what you mean by cohabit.

Do you mean that grub when booting has a different idea which is the first hard drive?
If so, look at the device.map file which maps grub names to kernel names.

druuna 05-03-2012 01:04 AM

Hi,
Quote:

Originally Posted by mike99 (Post 4669069)
I'm thinking this has something to do with GRUB. But, i cannot cohabit hda & sda partitions on the same hard drive. I am hoping it is just a line entry to modify in GRUB. I think the Linux kernel in the distro being installed determines if it is called a hda or a sda. Thanx 4the help!

This is indeed regulated by the kernel. hdX can still be used, but sdX is the de-facto standard on modern linux distro's.

Once the kernel is activated it decides the naming convention based on kernel settings. It is either hdX or sdX. If you have a dual-boot system one kernel can be set up to use the hdX naming convention, the other to use the sdX convention.

You do not mention what your actual problem is. Care to elaborate?
- What is your set-up,
- Do you dual boot,
- When do you run into this problem.

Hope this helps.

mike99 05-03-2012 01:31 AM

Well, i would like to install 3 distros on the same hard drive. "Older" distributions that have hdX do not play well with "modern" distributions.
And visa-versa. Which ever dist. is installed last is usually the GRUB i install that comes with that distribution. If the previously installed dist.s
have a drive/partition designation that is the same, then the new GRUB install asks if i want those others added to GRUB. If one of those is not the same
drive/partition designation, it does not add it and if i try to change the names in the GRUB/menu.list i get a kernel panic when it tries to boot
that partition. Does that make sense?

druuna 05-03-2012 04:08 AM

Hi,
Quote:

Originally Posted by mike99 (Post 4669098)
Well, i would like to install 3 distros on the same hard drive. "Older" distributions that have hdX do not play well with "modern" distributions. And visa-versa.

Quote:

Which ever dist. is installed last is usually the GRUB i install that comes with that distribution.
That is true when you use all the defaults during the installation. You can however tell the installer to skip the grub installation, if one does that you do need to add the new entry to the already existing grub setup.

Quote:

If the previously installed dist.s have a drive/partition designation that is the same, then the new GRUB install asks if i want those others added to GRUB. If one of those is not the same drive/partition designation, it does not add it and if i try to change the names in the GRUB/menu.list i get a kernel panic when it tries to boot that partition.
What are you changing? If you are missing an entry you should add it, you shouldn't have to change the already present entries.

Although I'm not 100% sure thie following will work (never tried it myself) you could try the following:

Assumptions:
- The installed grub is from a system that uses the sdX convention,
- You have a missing entry for a system that uses the hdX convention.

Add the missing entry and use the sdX convention in the grub.cfg for all the entries.

The thought behind this is that once you select an entry from the bootloader (grub), control is handed over by grub to the entry you have chosen, the kernel (et al) kicks in and decides which convention is used.

If you are going to play with the above suggestion do make sure you have backups (and possibly a life CD)!!

Hope this helps.

smoker 05-03-2012 01:06 PM

I always thought that disks (in linux) were named according to their type. SCSI / SATA / usb = sdx and IDE = hdx
Not a mere "convention" but a specific, descriptive naming policy.

druuna 05-03-2012 01:46 PM

Hi,
Quote:

Originally Posted by smoker (Post 4669621)
I always thought that disks (in linux) were named according to their type. SCSI / SATA / usb = sdx and IDE = hdx
Not a mere "convention" but a specific, descriptive naming policy.

The naming convention changed a while back (kernel 2.6.20 comes to mind, not 100% sure). These snippets from Device files - Linux Naming conventions
Quote:

hd: (“classic”) IDE driver (previously used for ATA hard disk drive, ATAPI optical disc drives, etc.)
and
SCSI driver, also used by libATA (modern PATA/SATA driver), USB, IEEE 1394, etc.
I do believe you can still go back to the old naming schema by (un)setting the appropriate kernel options.

273 05-03-2012 01:56 PM

I'm not sure why it matters to GRUB which scheme the other installs use. I was under the impression GRUB just searches partitions for kernels and adds entries for them, so why would it matter what another install called the partition?
Have you tried running update-grub after the last install?

druuna 05-03-2012 02:24 PM

Hi,
Quote:

Originally Posted by 273 (Post 4669649)
I'm not sure why it matters to GRUB which scheme the other installs use. I was under the impression GRUB just searches partitions for kernels and adds entries for them, so why would it matter what another install called the partition?
Have you tried running update-grub after the last install?

Simplified, from a machine running a new 3.2 kernel:
Code:

set root=(hd0,2)
menuentry "GNU/Linux, Linux 3.2.6" { linux  /boot/vmlinuz-3.2.6 root=/dev/sda2 ro

That would have to be hda2 for a machine running a kernel prior to 2.6.20:
Code:

set root=(hd0,2)
menuentry "GNU/Linux, Linux 2.6.19" { linux  /boot/vmlinuz-2.6.19 root=/dev/hda2 ro

My understanding is that a partial link to the system on which grub was installed/configured is present during grubs part of the boot process:
- During the install a specific naming schema is in use (which might or might not be partially written to MBR),
- /boot/grub.cfg is used by grub, which resides on one specific system (the one grub was installed/configured on).
- maybe more....

273 05-03-2012 02:40 PM

Yes, I see now why it is a problem having them all labelled sd instead of hd.
Could you maybe install GRUB on the partitions of the older systems and chainload them, or whatever it's called.

mike99 05-04-2012 12:08 AM

O.K. ,Today i installed a 3rd O/S linux partition. After install, it wanted to know if i wanted to install/update GRUB or not. When it got to the update screen it said there is another step that must be done manually. It then thought about it (older machine) and then showed me what to put in the Menu.lst file. It was listed as "hda4" and it worked!!
i think what i was trying before was "NOT" to take an install/update to GRUB and cancel out of there and then go to the file, create the params and save. It never worked.
The other thing i would do is reinstall GRUB from the "New Installation" (not update) and if the previous other installs had different naming conventions then what the new install was, they would not work.
Thanks for all the help! Next I'll try to install Vector Linux. It used to use Lilo, but maybe now i can add it to GRUB without having to put Lilo on a diskette.

druuna 05-04-2012 02:10 AM

You're welcome :)

BTW: Can you put up the [SOLVED] tag.
first post -> Thread Tools -> Mark this thread as solved


All times are GMT -5. The time now is 12:04 AM.