Author Topic: bootloader failed! [solved]  (Read 2513 times)

Offline yeshe

  • Sr. Member
  • ****
  • Posts: 274
  • Forest sangha
bootloader failed! [solved]
« on: August 23, 2009, 03:15:03 AM »
Help, I can't start my PC!

I have pclos2007 on hda5 and pclos2009 on hdb1. From the beginning I have had the pclos2007 but when I installed pclos2009 on hdb I had some trouble with the bootloaders.. eventually , to be able to choose between the two I first botted up on hdb - and the 2009 bootloader. There I added an option to load 2007, but if I choosed that one I came to the 2007 bootloader and had to choose again. (I couldn't solve it in a better way)

Well... now I removed the 2009 disk (because I never got the 2009 work properly) but I mixed up the disks or so... anyway... it was impossible to boot 2007 anymore. I tried to move the disks to diffrent places (master/slave) but no improvement. I run the pclos2009 live-CD and did redo-mbr. But the "menu.lst" file opens and I don't know what to change! I tried redo-mbr without changing the menu.lst but with no improvement.

Before I got the grub error 22 , then the pclos2007 seemed to start , but it couldn't finish it... I came to a shell that rebooted on exit. But now the bootloader doesn't even start - it immediately reboots after bios! When I put the pclos2009 disk back to it's place that one couldn't start either. After choosing pclos2009 in grub (using the 2009 bootloader) it tries to start up but soon says "kernel panic - trying to kill init" and freezes.

Now I'm using the live CD!

My pclos2007 is very important to me, it contains programs and stuff that is not yet installed anywhere else.

Is there an option to make "redo-mbr" from scratch ... it's obvious that my menu.lst is not up to date, and I don't know what to change?

this is hda5/boot/grub/menu.lst
Quote
timeout 10
color black/cyan yellow/cyan
gfxmenu (hd0,4)/boot/gfxmenu
default 4

title linux
kernel (hd0,4)/boot/vmlinuz BOOT_IMAGE=linux root=UUID=7e49b76e-dff3-47e2-99d3-c48703e7c47f acpi=on resume=UUID=fc0c95c9-3feb-46bb-90b8-5377863afaee splash=silent vga=788
initrd (hd0,4)/boot/initrd.img

title linux-nonfb
kernel (hd0,4)/boot/vmlinuz BOOT_IMAGE=linux-nonfb root=UUID=7e49b76e-dff3-47e2-99d3-c48703e7c47f acpi=on resume=UUID=fc0c95c9-3feb-46bb-90b8-5377863afaee
initrd (hd0,4)/boot/initrd.img

title failsafe
kernel (hd0,4)/boot/vmlinuz BOOT_IMAGE=failsafe root=UUID=7e49b76e-dff3-47e2-99d3-c48703e7c47f failsafe acpi=on
initrd (hd0,4)/boot/initrd.img

title windows
root (hd2,0)
map (0x82) (0x80)
map (0x80) (0x82)
makeactive
chainloader +1

title PCLinuxOS release 2007 (PCLinuxOS)
root (hd1,0)
configfile /boot/grub/menu.lst

and this is  hdb1/boot/grub/menu.lst
Quote
timeout 10
color black/cyan yellow/cyan
gfxmenu (hd0,0)/usr/share/gfxboot/themes/pclinuxos/boot/message
default 0

title linux
kernel (hd0,0)/boot/vmlinuz BOOT_IMAGE=linux root=/dev/hda1 acpi=on resume=/dev/hda5 splash=silent vga=788
initrd (hd0,0)/boot/initrd.img

title linux-nonfb
kernel (hd0,0)/boot/vmlinuz BOOT_IMAGE=linux-nonfb root=/dev/hda1 acpi=on resume=/dev/hda5 splash=silent
initrd (hd0,0)/boot/initrd.img

title failsafe
kernel (hd0,0)/boot/vmlinuz BOOT_IMAGE=failsafe root=/dev/hda1 failsafe acpi=on resume=/dev/hda5
initrd (hd0,0)/boot/initrd.img

title memtest-2.01
kernel (hd0,0)/boot/memtest-2.01.bin BOOT_IMAGE=memtest-2.01  splash=silent

# This is a divider, added to separate the menu items below from the PCLINUXOS standard grub entries
title      Other operating systems:


# This entry automatically added by the PCLinuxOS redo-mbr for an existing
# linux installation on /dev/hdb5.
title      linux (on /dev/hdb5)
root      (hd1,4)
kernel      /boot/vmlinuz BOOT_IMAGE=linux root=UUID=7e49b76e-dff3-47e2-99d3-c48703e7c47f acpi=on resume=UUID=fc0c95c9-3feb-46bb-90b8-5377863afaee splash=silent vga=788
initrd      (hd0,4)/boot/initrd.img
savedefault
boot
« Last Edit: August 25, 2009, 03:17:39 AM by yeshe »

Offline DeBaas

  • Hero Member
  • *****
  • Posts: 1521
    • PCLinuxOS.nl
Re: bootloader failed!
« Reply #1 on: August 23, 2009, 04:59:17 AM »
Check (hd0,0)
     (hd0 is for the first HDD     (counting from 0)
     ,0) is for the first partition  (counting from 0)
I remember the old PCLos 2007 was not that happy with UUID, maybe change back to /dev/hda(x) or /dev/hdb(x)  ((x) counting from 1)

When you change the boot order in BIOS to startup from your slave drive it becomes (hd0
Chainloading your master makes this (hd1, so your menu.lst is'nt correct anymore.
I found, with redo MBR or newinstall, it makes mistakes with a changed (BIOS) boot order.
In your Windows section M$ is on the third (hd2 HDD en it is mapped fom (0x82) third to (0x80) first to make it drive C:
If you removed the second HDD you have to change these settings.

Ed
« Last Edit: August 23, 2009, 05:36:15 AM by DeBaas »

Offline yeshe

  • Sr. Member
  • ****
  • Posts: 274
  • Forest sangha
Re: bootloader failed!
« Reply #2 on: August 23, 2009, 05:46:32 AM »
Hi.
Thanks for the answer.  :)
It seems that I've mixed up the disks and thought that pclos2007 was on (0,0) primary master, but in fact it is the slave and the pclos2009-disk is the master, and that's the wrong setup!
I'll change that first and then try redo-mbr again. My windows disk is not there anymore.

If I can connet to the net anymore I will tell the result (perhaps come up with some new questions)

What is UUID?

Offline DeBaas

  • Hero Member
  • *****
  • Posts: 1521
    • PCLinuxOS.nl
Re: bootloader failed!
« Reply #3 on: August 23, 2009, 08:18:35 AM »
Another ID for HDD recognition, look in /dev/disk/ you find different ways to do so. UUID is unique for every HDD. Even if you change the HDD from disk 0 to disk 25 it's still recognized by Linux.
BUT NOT with the (hd0,0) form.
So if you change the HDD from master to slave or add one extra you only have to check for the (hd0,0) sentence.
The same happens to /etc/fstab where UUID resolves the changing of the HDD's
The newer versions of PCLos all use UUID
The same is the LABEL item that can be used on the same place as the Universally Unique Identifier.
With the old kernel from PCLos 2007 it did not work for my Grub menu.lst
Also with the old PCLos was the form /dev/hda5 instead of UUID=a1a74e10-9c73-418c-88e6-8659ede37838 in /dev/fstab
In this case you should also change the fstab settings, example, hda5 to hdb5
When you right click on the items in /dev/disk/by-uuid/ you see in the properties the connection with hda1, hdb2, etc.
So check carefully /boot/grub/menu.lst and /dev/fstab if you change or use strange settings in BIOS, or add or change the numbering of your HDD's.
Extra, SATA disks are called sda, sdb instead of hda, hdb, but not in the (hd0,0) sentence.
In my system I boot from SATA (sda) and have two IDE disks (hda and hdb)
SATA=hd0 IDE=hd1 and hd2
Also can boot (BIOS) from IDE
IDE=hd0 and hd1 SATA=hd2
When I do redo MBR (Sata as bootdisk) it always makes the wrong decision and put SATA as hd2 in menu.lst.
I found out the hard way ;)

Happy adventuring
Ed
« Last Edit: August 23, 2009, 08:36:14 AM by DeBaas »

Offline yeshe

  • Sr. Member
  • ****
  • Posts: 274
  • Forest sangha
Re: bootloader failed!
« Reply #4 on: August 23, 2009, 11:28:12 AM »
>So if you change the HDD from master to slave or add one extra you only have to check for the (hd0,0) sentence.

uh.. so (hd0,0) is not always primary master, is that what you say? If I move around the disk that was primarily installed as (hd0,0) it will be called (hd0,0) forever, regardless of where it is physically mounted?

That's why I could never sort out which disk was which, I've been changing theese two disks now from master to slave so many times, soon the connectors are worn out!  :P

Or did I misunderstand you now?

Anyway, hopefully this information will eventually help me!

time to reboot again!
« Last Edit: August 23, 2009, 11:34:10 AM by yeshe »

Offline DeBaas

  • Hero Member
  • *****
  • Posts: 1521
    • PCLinuxOS.nl
Re: bootloader failed!
« Reply #5 on: August 23, 2009, 01:09:32 PM »
If you put grub on the master disk and PCLos is on the master disk on partition 2 (hda2) it is (hd0,1) for the sake of argument with swap on partition 3 (hda3)
Quote
title 2.6.26.8.tex3
kernel (hd0,1)/boot/vmlinuz-2.6.26.8.tex3 BOOT_IMAGE=2.6.26.8.tex3 root=/dev/hda2 acpi=on resume=/dev/hda3 splash=silent vga=788
initrd (hd0,1)/boot/initrd-2.6.26.8.tex3.img
Now we take this disk to slave and another one to master.
We use this new disk for another linux install with a new grub and menu list.
To start PCLos on the second drive we have to add
Quote
title 2.6.26.8.tex3
kernel (hd1,1)/boot/vmlinuz-2.6.26.8.tex3 BOOT_IMAGE=2.6.26.8.tex3 root=/dev/hdb2 acpi=on resume=/dev/hdb3 splash=silent vga=788
initrd (hd1,1)/boot/initrd-2.6.26.8.tex3.img
to the new menu.lst
In case of UUID it is for one disk
Quote
title 2.6.26.8.tex3
kernel (hd0,1)/boot/vmlinuz-2.6.26.8.tex3 BOOT_IMAGE=2.6.26.8.tex3 root=UUID=a1a74e10-9c73-418c-88e6-8659ede37838 acpi=on resume=UUID=eb2996c5-3be0-4487-9763-b25c4d54102b splash=silent vga=788
initrd (hd0,1)/boot/initrd-2.6.26.8.tex3.img
Add on the new menu.lst
Quote
title 2.6.26.8.tex3
kernel (hd1,1)/boot/vmlinuz-2.6.26.8.tex3 BOOT_IMAGE=2.6.26.8.tex3 root=UUID=a1a74e10-9c73-418c-88e6-8659ede37838 acpi=on resume=UUID=eb2996c5-3be0-4487-9763-b25c4d54102b splash=silent vga=788
initrd (hd1,1)/boot/initrd-2.6.26.8.tex3.img
With UUID we do not need any change for the partition ID
Now for the weirdness we tell the BIOS to boot from the slave disk
Quote
title 2.6.26.8.tex3
kernel (hd0,1)/boot/vmlinuz-2.6.26.8.tex3 BOOT_IMAGE=2.6.26.8.tex3 root=/dev/hdb2 acpi=on resume=/dev/hdb3 splash=silent vga=788
initrd (hd0,1)/boot/initrd-2.6.26.8.tex3.img
or
Quote
title 2.6.26.8.tex3
kernel (hd0,1)/boot/vmlinuz-2.6.26.8.tex3 BOOT_IMAGE=2.6.26.8.tex3 root=UUID=a1a74e10-9c73-418c-88e6-8659ede37838 acpi=on resume=UUID=eb2996c5-3be0-4487-9763-b25c4d54102b splash=silent vga=788
initrd (hd0,1)/boot/initrd-2.6.26.8.tex3.img
And DO NOT FORGET /etc/fstab from the Linux you want to start, no problem if you use UUID.

And now sit for an examination, I change my disks some times, part of my menu.lst, copied on al disk's
If it's on the wrong disk I have no graphics but a text menu, PCLos will start up ;) if it is on one of the 3 HDD's, even if it's the only disk.
Quote
timeout 5
color light-gray/red red/light-gray
gfxmenu (hd1,4)/boot/gfxmenu
default 0
fallback 1 2

title 2.6.27.29.tex1
kernel (hd1,4)/boot/vmlinuz-2.6.27.29.tex1 BOOT_IMAGE=2.6.27.29.tex1 root=UUID=a1a74e10-9c73-418c-88e6-8659ede37838 acpi=on resume=UUID=eb2996c5-3be0-4487-9763-b25c4d54102b splash=silent vga=788
initrd (hd1,4)/boot/initrd-2.6.27.29.tex1.img

title 2.6.27.29.tex1
kernel (hd2,4)/boot/vmlinuz-2.6.27.29.tex1 BOOT_IMAGE=2.6.27.29.tex1 root=UUID=a1a74e10-9c73-418c-88e6-8659ede37838 acpi=on resume=UUID=eb2996c5-3be0-4487-9763-b25c4d54102b splash=silent vga=788
initrd (hd2,4)/boot/initrd-2.6.27.29.tex1.img

title 2.6.27.29.tex1
kernel (hd0,4)/boot/vmlinuz-2.6.27.29.tex1 BOOT_IMAGE=2.6.27.29.tex1 root=UUID=a1a74e10-9c73-418c-88e6-8659ede37838 acpi=on resume=UUID=eb2996c5-3be0-4487-9763-b25c4d54102b splash=silent vga=788
initrd (hd0,4)/boot/initrd-2.6.27.29.tex1.img

Hope you learned your lessons from today ;)
Ed
« Last Edit: August 23, 2009, 01:28:15 PM by DeBaas »

Offline yeshe

  • Sr. Member
  • ****
  • Posts: 274
  • Forest sangha
Re: bootloader failed!
« Reply #6 on: August 23, 2009, 03:52:06 PM »
Thankyou.

OK, I got it now, the (hdx,x) stuff, and I changed it right and made redo-mbr on both disks.

What I haven't done yet is to check the etc/fstab file at any of the disks.
I will, but now it is bedtime (at least in Europe), I'll be back tomorrow  :)

(This takes so long time - each time I shall write here I have to boot the live CD!)  :(

Anyway: What is happening now is that if I try to boot from hdb, grub doesn't even load - it just reboots again! And if I try to boot from hda grub loads (with graphics and all), but when I press PClos2007 it begins to load... but after a few seconds I got this screen:



well. Good night!

Offline DeBaas

  • Hero Member
  • *****
  • Posts: 1521
    • PCLinuxOS.nl
Re: bootloader failed!
« Reply #7 on: August 23, 2009, 04:02:26 PM »
You have to check your /dev/hdc stuf in /etv/fstab, it should be hda or hdb I think, with the Live CD you can edit your HDD files............tomorrow,
goodnight.
I'm gonne crash too.
« Last Edit: August 23, 2009, 04:06:20 PM by DeBaas »

Offline nerdful1

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1575
  • Registered Linux User #444541
    • Nerdful Things
Re: bootloader failed!
« Reply #8 on: August 23, 2009, 05:53:54 PM »
You might want to look into making a 'super grub disc'   (will edit with info) update: supergrubdisk.org

I use this many times in machines that windows 7 wipes out the pclos boot, but leaves the partitions intact, and also when I've lost boot info.

A magazine article needs to be written about UUID. What percentage of Linux users understands UUID? I haven't sat down to figure it out yet, but it cost me a 250g drive worth of data for not understnding.
« Last Edit: August 23, 2009, 05:57:08 PM by nerdful1 »
Promote open source.
Stars up!  Lights Down! Use sky and neighbor friendly outdoor lighting, and save energy.  Darksky dot org.
 ISF Professional that wants to keep black level in the sky.
Mythic Dragon V1.0 Desktop HTPC running PCLOS & Mythtv simultaneously.

Offline yeshe

  • Sr. Member
  • ****
  • Posts: 274
  • Forest sangha
Re: bootloader failed!
« Reply #9 on: August 24, 2009, 01:31:01 AM »
Good morning!

i checked /etc/fstab at hda1 (the one that fails) but I can't see anything wrong?

But I think the problem is that it is starting the wrong kernel or something or with wrong parameters . A strange thing is that when pclos2007 is trying to boot (see screenshot above) the graphical background is not the original pclos2007 blue thing, but is replaced with the pclos2009 black one as you can see at the pic. Perhaps the 2007-grub has been overwritten by a new one?

If super grub disc can't help me I will try to make a new install of pclos2007 on another disc. The problem is that my liveCD is quite old and I dont know if it's possible to update it now (it's from 2008)
                                                                                                                            
/etc/fstab
Quote
# /dev/hda1, size=14153202, type=131: Journalised FS: ext3 (primary)
/dev/hda1 / ext3 defaults 1 1
none /dev/pts devpts mode=0620 0 0
# /dev/hda6, size=41158467, type=131: Journalised FS: ext3 (extended)
/dev/hda6 /home ext3 defaults 1 2
/dev/hdc1 /mnt/40gb ext3 defaults 1 2
/dev/hdb1 /mnt/backup ext3 user,suid,defaults 1 2
/dev/hdd /mnt/cdrom auto noauto,noexec,user,ro,iocharset=utf8,umask=000 0 0
# DVD removed: /dev/hdc /mnt/dvd auto umask=0,user,iocharset=utf8,ro 0 0
# /dev/hda7, size=96357807, type=131: Journalised FS: ext3 (extended)

/dev/hda7 /mnt/hda7 ext3 user,exec,rw,auto 1 2
/dev/hdb7 /mnt/home09 ext3 defaults 1 2
/dev/hdb5 /mnt/pclos2009 ext3 defaults 1 2
none /proc proc defaults 0 0
none /proc/bus/usb usbfs auto,devmode=0666 0 0
# /dev/hda5, size=4626657, type=130: Linux swap (extended)
/dev/hda5 swap swap defaults 0 0

EDIT: aha... hdc1 was a FAT32 but fstab expected a ext3...

The error at boot was:
fsck.ext3: No such file or directory while trying to open /dev/hdc1
/dev/hdc1: The superblock could not be read or does not edscribe a correct ext2 filesystem.... and you might try to run e2fsck with an alternate superblock: e2fsck -b 8193 <device>

but now I have formatted hdc as a fat3. But it is strange that boot fails becaus of hdc! The hdc disc is just an extra disc that doesn't contain anything (yet)!
« Last Edit: August 24, 2009, 01:42:18 AM by yeshe »

Offline DeBaas

  • Hero Member
  • *****
  • Posts: 1521
    • PCLinuxOS.nl
Re: bootloader failed!
« Reply #10 on: August 24, 2009, 01:55:00 AM »
You where nearly there, CTRL-D to continuing boot ;)

Is this hdc in your system ? third HDD ?
To avoid startup problems comment it out

# /dev/hdc1 /mnt/40gb ext3 defaults 1 2

« Last Edit: August 24, 2009, 02:00:54 AM by DeBaas »

Offline yeshe

  • Sr. Member
  • ****
  • Posts: 274
  • Forest sangha
Re: bootloader failed!
« Reply #11 on: August 25, 2009, 03:16:56 AM »
I'm sure I had replied to this once before ???

Well, I removed the hdc line in fstab and it all works smoothly again!

Thanks for the lesson. Next time I will know a little more.
But still, I don't know what happened in the first place? OK, I mixed the disks up, but "kernel panic" when booting pcl2009 and trying to load the plc2007 the PC rebooted immideatley...  ???

Offline DeBaas

  • Hero Member
  • *****
  • Posts: 1521
    • PCLinuxOS.nl
Re: bootloader failed! [solved]
« Reply #12 on: August 25, 2009, 03:54:21 AM »
I asume the kernel panic was there for the mixed up disk's and/or confused redo-MBR where menu.lst and/or fstab are pointing to the wrong disks.
Fortunatly with the live CD you can edit the "wrong" files.
Next time it's easy like.........................

You can add the third disk again within PCC diskmanager.
When you let PCC write the changes to fstab, check fstab before you reboot.
Always handy to have a copy of the original menu.lst and fstab, made BEFORE any changes ;)

Ed
« Last Edit: August 25, 2009, 04:07:15 AM by DeBaas »

jbike

  • Guest
Re: bootloader failed! [solved]
« Reply #13 on: January 16, 2010, 12:40:09 PM »
I have the same problem.... but I posted it here since my original thread is not solved. Any help would be greatly appreciated!

http://www.pclinuxos.com/forum/index.php/topic,63625.0.html

thanks,
Jbike
« Last Edit: January 16, 2010, 01:15:12 PM by jbike »