Find the answer to your Linux question:
Results 1 to 6 of 6

Thread: Grub2 problems

Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Grub2 problems

    I'm having problems adding an entry in GRUB2. I have an Arch linux installation on sda4 with its /boot on sda3. Nothing i've tried works. Here's my current entry script:
    #! /bin/sh
    cat <<EOF
    menuentry "Arch Linux" {
    set root=(hd0,4)
    linux /vmlinuz root=(hd0,3) ro
    initrd /kernel26.img
    (Yes, the initial ramdisk is called kernel26. I think this is odd, too.)

    I've tried linux and initrd lines like this as well:

    linux (hd0,3)/vmlinuz
    initrd (hd0,3)/kernel26.img

    But that may have been in grub legacy.
    Any pointers?
    Last edited by MikeTbob; 01-03-2011 at 02:49 PM. Reason: Added Code Tags

  2. #2
    Hello fishin4guitars!


    While waiting for the gurus to clarify on your issue, it might be of help if you can post the output of

    fdisk -l (-l is small -L)
    df -h

    So we can have a better picture of your HD.
    Linux User #489667

  3. #3
    Linux Guru Jonathan183's Avatar
    Join Date
    Oct 2007
    Here is my entry to boot arch
    menuentry "Arch Linux - Use this most of the time ;-)" --class archlinux --class gnu-linux --class gnu --class os {
        echo    Loading Arch Linux from sda1 ...
        insmod ext2
        set root='(hd0,1)'
        search --no-floppy --fs-uuid --set fe38efc3-1346-4a89-8393-0b6416366659
        echo    Loading Linux vmlinuz26 ...
        linux    /boot/vmlinuz26 root=/dev/sda1 ro rootdelay=1
        echo    Loading initial ramdisk ...
        initrd    /boot/kernel26.img
    I don't have a separate boot partition but think you should be able to modify to suit. So your entry should be something like ...
    menuentry "Arch Linux - boot sda3, root sda4" --class archlinux --class gnu-linux --class gnu --class os {
        echo    Loading Arch Linux from sda3 ...
        insmod ext2
        set root='(hd0,3)'
        search --no-floppy --fs-uuid --set uuid_for_sda3_goes_here_I_think
        echo    Loading Linux vmlinuz26 ...
        linux    /vmlinuz26 root=/dev/sda4 ro rootdelay=1
        echo    Loading initial ramdisk ...
        initrd    /kernel26.img
    But I am not sure why
    grub-mkconfig -o /boot/grub/grub.cfg
    is not generating valid entries.

    What errors do you get when you try to boot your existing entries?

  4. $spacer_open
  5. #4
    Linux Guru reed9's Avatar
    Join Date
    Feb 2009
    Boston, MA
    Well, I don't use GRUB2, but looking at the Arch Wiki entry, your syntax seems wrong.

    This should be point to the UUID or /dev
    linux /vmlinuz root=(hd0,3) ro
    Should probably be
    linux /vmlinuz root=/dev/sda4 ro

  6. #5
    Ok. I'll try this. I guess I thought it needed to be in grub's (hdx,y) format to work.

  7. #6
    It actually starts booting, but then it says it can't find something (I can't remember, will update later), and puts me into a ramfs prompt ( [ramfs /]# ).


    I accidentally created this thread twice. Sorry.


    It can't find /sbin/init.


    Also, how did you set up your install so that there was no /boot partition? I've tried, and every time I've ended up with no /boot.
    Last edited by fishin4guitars; 01-06-2011 at 02:17 AM. Reason: question

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts