I wanted to add new menu entry to my GRUB2 list. This is how I tried to do this and necessary info:
Erros after choosing "Debian Wheezy" menu entry from GRUB2 list:
error:file not found
error:you need to load the kernel first
/etc/grub.d/12_debian
#!/bin/sh -e
cat << EOF
menuentry "Debian Wheezy" {
set root=(hd0,5)
linux /boot/vmlinuz-3.2.0-3-amd64
initrd /boot/initrd.img-3.2.0-3-amd64
}
EOF
ls /boot
config-3.2.0-3-amd64 initrd.img-3.2.0-3-amd64 vmlinuz-3.2.0-3-amd64
grub System.map-3.2.0-3-amd64
Partitioning
sda1 - ntfs - Windows boot
sda2 - ntfs - Windows C:
sda3 - ntfs - Windows D:
sda4 - extended
-sda5 - ext4 - /boot
-sda6 - lvm - Debian testing
And inside sda6 there's LVM group calld G1 divided into volumes:
home, root, tmp, usr, var, swap
Sources that I used during my unsuccessful of setting everything up.
GRUB 2 bootloader - Full tutorial on Dedoimedo.com
What's wrong? Sorry, I'm still a newbie.
EDIT #1
fdisk -l
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 206847 102400 7 HPFS/NTFS/exFAT
/dev/sda2 206848 83473739 41633446 7 HPFS/NTFS/exFAT
/dev/sda3 83473799 935802314 426164258 7 HPFS/NTFS/exFAT
/dev/sda4 935802315 976771071 20484378+ f W95 Ext'd (LBA)
/dev/sda5 935802880 936779775 488448 83 Linux
/dev/sda6 936781824 976771071 19994624 8e Linux LVM
EDIT #2
Grub console
linux /[TAB]
Possible files are:
lost+found/ bin/ share/ sbin/ lib/ include/ src/ games/ local/
set root=(hd0,msdos5)
linux/[TAB]
Possible files are:
lost+found/ config-3.2.0-3-amd64 vmlinuz-3.2.0-3-amd64 grub/
System.map-3.2.0-3-amd64 initrd.img-3.2.0-3-amd64
Grub console, boot test
set root=(hd0,msdos5)
linux /vmlinuz-3.2.0-3-amd64 root=/dev/G1/root
initrd /initrd.img-3.2.0-3-amd64
boot
#Many, many, many lines of text. After few seconds they stop. The most
#interesting i think are:
ALERT! /dev/G1/root does not exist. Dropping to a shell!
/bin/sh: can't access tty; job control turned off
/etc/grub.d/12_debian another try
#!/bin/sh -e
cat << EOF
menuentry "Debian Wheezy" {
insmod ext4
set root=(hd0,msdos5)
echo 'loading...'
linux /vmlinuz-3.2.0-3-amd64
echo 'starting kernel...'
initrd /initrd.img-3.2.0-3-amd64
}
EOF
Result:
error:file not found
loading...
starting kernel...
EDIT #3
part of /boot/grub/grub.cfg
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Debian GNU/Linux, with Linux 3.2.0-3-amd64' --class debian -- class gnu-linux --class gnu --class os {
insmod gzio
insmod lvm
insmod part_msdos
insmod ext2
set root='(G1-root)'
search --no-floppy --fs-uuid --set=root 94215fad-dcbe-4339-92be-f562b1b37133
echo 'Loading Linux 3.2.0-3-amd64 ...'
linux /boot/vmlinuz-3.2.0-3-amd64 root=/dev/mapper/G1-root ro quiet
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-3.2.0-3-amd64
}
### END /etc/grub.d/10_linux ###
/etc/grub.d/12_debian next try
#!/bin/sh -e
cat << EOF
menuentry "Debian Wheezy" {
insmod ext4
set root=(hd0,msdos5)
echo 'loading...'
linux /vmlinuz-3.2.0-3-amd64 root=/dev/mapper/G1-root
echo 'starting kernel...'
initrd /initrd.img-3.2.0-3-amd64
}
Result
error:file not found
loading...
starting kernel...