PDA

View Full Version : [ubuntu] Two harddisk Three OS Grub problem



gkx_maniac
September 5th, 2009, 06:25 PM
I had working primary hdd with windows xp and ubuntu 8.10 and secondary data hdd. I decided to install ubuntu 9.04 from minimalcd to secondary hdd. During setup, ı created a ext4 partiton and continued but it give an error at grup install step but ı finished install progress. It worked correctly. I customized it for my needs but my boot entries for xp and 8.10 were gone. So ı restore grub from 8.10 live cd after that ı learned that the grub version doesn't support ext4 so ı upgraded it to grub2. But ı wasn't able to add working entry for my 9.04 install. I'm posting below my fdisk -l, my current grub.cfg and 9.04's grub.cfg from secondary hdd. I tried copy paste menu entries from 9.04's but they give "load kernel module first" error. I did lots of googling but everything ı tried didn't work. I'll really appreciate helps.


Disk /dev/sda: 20.0 GB, 20020396032 bytes
255 heads, 63 sectors/track, 2434 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x3240323f

Device Boot Start End Blocks Id System
/dev/sda1 * 1 1415 11365956 7 HPFS/NTFS
/dev/sda2 1416 2303 7132860 83 Linux
/dev/sda3 2304 2434 1052257+ 82 Linux swap / Solaris

Disk /dev/sdb: 40.0 GB, 40027029504 bytes
255 heads, 63 sectors/track, 4866 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x1010100f

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 3948 31712278+ 7 HPFS/NTFS
/dev/sdb2 3949 4866 7373835 5 Extended
/dev/sdb5 3949 4750 6442033+ 83 Linux
/dev/sdb6 4751 4866 931738+ 82 Linux swap / Solaris

Current grub.cfg
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/update-grub using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
set default=0
set timeout=5
set root=(hd0,2)
if font (hd0,2)/usr/share/grub/unicode.pff ; then
set gfxmode=640x480
insmod gfxterm
insmod vbe
terminal gfxterm
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_hurd ###
### END /etc/grub.d/10_hurd ###

### BEGIN /etc/grub.d/10_linux ###
menuentry "Ubuntu, linux 2.6.27-9-generic" {
linux (hd0,2)/boot/vmlinuz-2.6.27-9-generic root=UUID=cce7f3fd-75c1-42fb-909b-239fd62852c2 ro quiet splash
initrd (hd0,2)/boot/initrd.img-2.6.27-9-generic
}
menuentry "Ubuntu, linux 2.6.27-9-generic (single-user mode)" {
linux (hd0,2)/boot/vmlinuz-2.6.27-9-generic root=UUID=cce7f3fd-75c1-42fb-909b-239fd62852c2 ro single
initrd (hd0,2)/boot/initrd.img-2.6.27-9-generic
}
menuentry "Ubuntu, linux 2.6.27-14-generic" {
linux (hd0,2)/boot/vmlinuz-2.6.27-14-generic root=UUID=cce7f3fd-75c1-42fb-909b-239fd62852c2 ro quiet splash
initrd (hd0,2)/boot/initrd.img-2.6.27-14-generic
}
menuentry "Ubuntu, linux 2.6.27-14-generic (single-user mode)" {
linux (hd0,2)/boot/vmlinuz-2.6.27-14-generic root=UUID=cce7f3fd-75c1-42fb-909b-239fd62852c2 ro single
initrd (hd0,2)/boot/initrd.img-2.6.27-14-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
linux (hd0,2)/boot/memtest86+.bin
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Microsoft Windows XP Professional (on /dev/sda1)" {
set root=(hd0,1)
chainloader +1
}
menuentry "ubuntu (on /dev/sda1)" {
set root=(hd1,5)
chainloader +1
}
### END /etc/grub.d/30_os-prober ###


9.04's grub.cfg from ext4 partition
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/update-grub using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
set default=0
set timeout=5
set root=(hd1,5)
search --fs-uuid --set d3ae152a-a274-453d-89ec-cdb09f6ea190
if font /usr/share/grub/ascii.pff ; then
set gfxmode=640x480
insmod gfxterm
insmod vbe
terminal gfxterm
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_hurd ###
### END /etc/grub.d/10_hurd ###

### BEGIN /etc/grub.d/10_linux ###
set root=(hd1,5)
search --fs-uuid --set d3ae152a-a274-453d-89ec-cdb09f6ea190
menuentry "Ubuntu, linux 2.6.28-15-generic" {
linux /boot/vmlinuz-2.6.28-15-generic root=UUID=d3ae152a-a274-453d-89ec-cdb09f6ea190 ro quiet splash
initrd /boot/initrd.img-2.6.28-15-generic
}
menuentry "Ubuntu, linux 2.6.28-15-generic (single-user mode)" {
linux /boot/vmlinuz-2.6.28-15-generic root=UUID=d3ae152a-a274-453d-89ec-cdb09f6ea190 ro single
initrd /boot/initrd.img-2.6.28-15-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
linux /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
linux /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file is an example on how to add custom entries
### END /etc/grub.d/40_custom ###