LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   grub2 to grub-legacy code (http://www.linuxquestions.org/questions/linux-general-1/grub2-to-grub-legacy-code-4175437797/)

rng 11-19-2012 08:37 AM

grub2 to grub-legacy code
 
I am trying to convert following grub.cfg menuentry for linux mint to grub-legacy code:

Quote:

menuentry 'Linux Mint 13 Cinnamon 32-bit, 3.2.0-33-generic (/dev/sda6)' --class linuxmint --class gnu-linux --class gnu --class os {
recordfail
gfxmode $linux_gfx_mode
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set=root ad...................12
linux /boot/vmlinuz-3.2.0-33-generic root=UUID=ad...................12 ro quiet splash $vt_handoff
initrd /boot/initrd.img-3.2.0-33-generic
}
Will following simple code work?
Quote:

title linux mint
root (hd0,5)
kernel /boot/vmlinuz-3.2.0-33-generic root=UUID=ad..............12 ro quiet splash
initrd /boot/initrd.img-3.2.0-33-generic

malekmustaq 11-19-2012 08:51 AM

Did it boot?

So long as Legacy Grub is properly installed I think your entry is valid: although I don't like UUID (a silly in-human text). I think it is better to speak to Legacy Grub in its usual human-read language at the kernel line:

Quote:

root (hd0,5)
kernel /boot/vimlinuz root=/dev/sda6 quiet splash
boot
Just the same, legacy understands that (unless maybe if you are using GPT, not MBR.

Hope that helps.

Goodluck.

rng 11-20-2012 09:57 AM

Thanks for your comments.

What does $vt_handoff stand for in linux line of grub.cfg file? Could we add that to the kernel line of menu.lst?

malekmustaq 11-20-2012 11:48 AM

Quote:

What does $vt_handoff stand for in linux line of grub.cfg file? Could we add that to the kernel line of menu.lst?
Sorry for delay I was out for a while.

No, you don't need to add it under Legacy Grub for it to run; I mean, at least in my case I never did add anything like that in the kernel line when I was using the legacy.

Hope that helps and good luck.

rng 11-22-2012 10:59 AM

Above code did not work but following worked:
Quote:

title linux mint
root (hd0,5)
kernel /boot/vmlinuz-3.2.0-33-generic root=LABEL=mint ro nosplash
initrd /boot/initrd.img-3.2.0-33-generic

syg00 11-22-2012 12:32 PM

The "root=[UUID,LABEL]..." support was usually in the initrd in a legacy grub environment. Ubuntu-type systems supported UUID, Fedora-type systems supported LABEL. Others supported both, still other neither.
Paid to know in advance, or unwind the initrd.


All times are GMT -5. The time now is 06:10 PM.