Monday, March 26, 2012

Grub error 17 and 15 after installation Arch

I installed the March Archbang iso today on a old pc and all went very well regarding Archbang but there were two grub errors, first error 17.
I was replacing an older Arch installation that I hadn't updated in more then a year but functioned flawlessly. The grub error 17 was a result of a changed partition table.
How to fix that is clearly described here .
But after doing that my problems weren't over.

The only change was that error 17 was now replaced by error 15.

The renaming of the booting items issue led to numerous grub 15 questions on the Arch forums: Solution
Modify /boot/grub/menu.lst so vmlinuz26 is vmlinuz-linux, kernel26.img is initramfs-linux.img and kernel26-fallback.img is initramfs-linux-fallback.img
But his was also not the problem;
I changed two aspects of my /boot/grub/menu.lst.
The reason this sort of problems is difficult to solve is that there are so many scenarios people use regarding making a dedicated booting partition or not, how the root folder is designated in /etc/fstab.
Anyway in etc/fstab my root partition was designated by the UUid that you can find by typing in the terminal
blkid.
Changing
kernel /boot/vmlinuz-linux root=/dev/sda6 ro
to
kernel /boot/vmlinuz-linux root=/dev/disk/by-uuid/xxx6840d-8769-41f4-xxxxxx ro

was one part of the solution. If in the fstab /dev/sda6 was mentioned I would have had to change the menu.lst to sda6; what I conclude is that naming should be identical in fstab and menu.lst.

Second issue
Use an absolute path to vmlinuz and initramfs.img

The fact that I don't use a separate boot partition means I had to change the default

kernel /vmlinuz-linux root=/dev/disk/by-uuid/xxx ro
initrd /initramfs-linux.img

to
kernel /boot/vmlinuz-linux root=/dev/disk/by-uuid/xxx ro
initrd /boot/initramfs-linux.img
There are a lot more reasons why you can get the error 15; forgetting to add the "ro" at the back of the line for example, but maybe somebody can use this solution.

No comments:

Blog Archive