Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I would like to change an entry for a solution to boot from CD from legacy grub (looks like title bla bla bla) to an entry to a format compatible to grub 2 (the one that looks like menuentry "bla bla bla" {.

The original legacy GRUB entry is as follows:

title Boot From CD/DVD Drive
    kernel /boot/grub/memdisk.din
    initrd /boot/grub/sbootmgr.dsk

Is there any sort of conversion rule to change this to something like the example I've put here on the next line? (This is from my precise's grub.cfg.)

menuentry 'Ubuntu, with Linux 3.2.0-25-generic' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    gfxmode $linux_gfx_mode
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='(hd0,msdos8)'
    search --no-floppy --fs-uuid --set=root efc87ac0-daac-4a32-9a85-ea57beff0e28
    linux   /boot/vmlinuz-3.2.0-25-generic root=UUID=efc87ac0-daac-4a32-9a85-ea57beff0e28 ro   quiet splash acpi_osi= $vt_handoff
    initrd  /boot/initrd.img-3.2.0-25-generic
}
share|improve this question
    
(Better too much information than too little!) –  WindowsEscapist Jun 23 '12 at 19:12
add comment

1 Answer

up vote 0 down vote accepted

General rules for GRUB to GRUB2 conversion:

First, the root hard drive partition needs to be specified along with the partition type:

insmod ext2

set root='(hd0,msdos8)'

Then, the kernel is specified. In GRUB, this was kernel. In GRUB2, it's linux:

linux /boot/grub/memdisk.bin (additional options can go here, such as a "set root" option for modern linux)

Then, the initial ramdisk is specified, which looks exactly the same as in legacy GRUB:

initrd /boot/grub/sbootmgr.dsk

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.