Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
Fails to boot after installation
Re: Fails to boot after installation
Don't happen to have a Debian live CD or DVD so would have to download that. I do however had a Knoppix boot CD available which I recently downloaded is that any help?
- kiyop
- Posts: 3983
- Joined: 2011-05-05 15:16
- Location: Where persons without desire to improve themselves fear to tread, in Japan
- Been thanked: 3 times
Re: Fails to boot after installation
I am not sure whether "grub-install" does well in chrooting from knoppix to debian, because I have never done such a thing.
The size of Super Grub2 Disk is only 2MB, while debian live cd image is by far larger.
You can dd the image to USB flash or CD-R from linux or:
http://www.debian.org/CD/faq/#record-unix
If you want to make Super Grub2 Disk from Windows, you can refer to
http://www.debian.org/CD/faq/#record-windows
With Super Grub2 Disk, the only thing you must do to try to boot debian installed on your hdd is:
1) Boot with Super Grub2 Disk.
2) Select "Detect any Operating System"
3) Select detected debian.
That is all.
If you prefer chrooting, read the following:
In debian, I chroot like the following:
Open terminal and to get root privilege,
and type root password.
In some live system,
may help instead.
To confirm the device file name of your installed debian partition,
You mentioned that /boot partition is /dev/sdb5 and I guess that /(root) partition is /dev/sdb7. I assume so.
To chroot, (because I do not know well where should be mounted on with Knoppix.)
You can modify above "auto" to a certain name of the filesystem, such as ext4, ext3, and so on. The filesystem must be shown in the output of "blkid" command.
I am not sure whether knoppix and debian use same device file name system or not.
I heard that knoppix is a derivative from debian. I hope they use similar device file name system.
If not, executing the above may harm your system. I am not sure.
After successful chroot, you can install grub2 code onto MBR of second hard disk by
If you want to install grub2 code onto MBR of first hard disk,
But, be careful.
If you execute "grub-install /dev/sd?" ("?" is a or b), the boot loader written on the MBR is destroyed.
You can backup the code on the MBR of the first hard disk (/dev/sda) by
before you run "grub-install".
You can increase above "1" to "63" or so, if you want to backup more than one sector.
I know that grub-isntall to MBR writes more than one sector for "MS-DOS partition table" system.
Even if you can successfully install and configure Grub2 code, you may be unable to boot debian due to some problem like that observed before (although now you have installed wheezy while you installed stable at that time.)
http://forums.debian.net/viewtopic.php? ... 81#p420571
You should wait Guru's reply.
Or you can use Super Grub2 Disk, which I suggest to use,
or
download debian live cd and use it.
One another way is to use Boot Repair:
https://help.ubuntu.com/community/Boot-Repair
http://sourceforge.net/p/boot-repair/home/Home/
but it is also very large like debian live cd.
And again I suggest you to run "boot info script" (you can run while knoppix is booting) and post the contents of the generated RESULTS.txt.
http://bootinfoscript.sourceforge.net/
The size of Super Grub2 Disk is only 2MB, while debian live cd image is by far larger.
You can dd the image to USB flash or CD-R from linux or:
http://www.debian.org/CD/faq/#record-unix
If you want to make Super Grub2 Disk from Windows, you can refer to
http://www.debian.org/CD/faq/#record-windows
With Super Grub2 Disk, the only thing you must do to try to boot debian installed on your hdd is:
1) Boot with Super Grub2 Disk.
2) Select "Detect any Operating System"
3) Select detected debian.
That is all.
If you prefer chrooting, read the following:
In debian, I chroot like the following:
Open terminal and to get root privilege,
Code: Select all
su -
In some live system,
Code: Select all
sudo su -
To confirm the device file name of your installed debian partition,
Code: Select all
blkid
To chroot, (because I do not know well where should be mounted on with Knoppix.)
Code: Select all
mkdir /mnt2
mount -t auto /dev/sdb7 /mnt2 -o rw
mount -t auto /dev/sdb5 /mnt2/boot -o rw
mount --bind /dev /mnt2/dev
mount --bind /dev/pts /mnt2/dev/pts
mount --bind /sys /mnt2/sys
mount --bind /proc /mnt2/proc
chroot /mnt2 /bin/bash
I am not sure whether knoppix and debian use same device file name system or not.
I heard that knoppix is a derivative from debian. I hope they use similar device file name system.
If not, executing the above may harm your system. I am not sure.
After successful chroot, you can install grub2 code onto MBR of second hard disk by
Code: Select all
grub-install /dev/sdb
Code: Select all
grub-install /dev/sda
If you execute "grub-install /dev/sd?" ("?" is a or b), the boot loader written on the MBR is destroyed.
You can backup the code on the MBR of the first hard disk (/dev/sda) by
Code: Select all
dd if=/dev/sda bs=512 count=1 of=/mbrbackup
You can increase above "1" to "63" or so, if you want to backup more than one sector.
I know that grub-isntall to MBR writes more than one sector for "MS-DOS partition table" system.
Even if you can successfully install and configure Grub2 code, you may be unable to boot debian due to some problem like that observed before (although now you have installed wheezy while you installed stable at that time.)
http://forums.debian.net/viewtopic.php? ... 81#p420571
I should again mention that I have never chroot from Knoppix to Debian. Thus chrooting from Knoppix to Debian may be dangerous. I am not sure.NickC wrote:My first install of Debian so forgive me if I miss something obvious.
Just installed Debian Squeeze using graphical install, standard options. Problem is after installation the system won't boot, just gets to a certain point and drops the monitor output and appears to lock-up. I have tried recovery mode, messages scroll past the screen but I can't see what the last line was before it failed.
The only 'non-free' driver required was for the NICs: rtl_nic/rtl8168-2.fw which I obtained from firmware-realtek_0.28+squeeze1_all.deb.
You should wait Guru's reply.
Or you can use Super Grub2 Disk, which I suggest to use,
or
download debian live cd and use it.
One another way is to use Boot Repair:
https://help.ubuntu.com/community/Boot-Repair
http://sourceforge.net/p/boot-repair/home/Home/
but it is also very large like debian live cd.
And again I suggest you to run "boot info script" (you can run while knoppix is booting) and post the contents of the generated RESULTS.txt.
http://bootinfoscript.sourceforge.net/
Openbox, JWM: Jessie, Sid, Arch / Win XP (on VirtualBox), 10
http://kiyoandkei.bbs.fc2.com/
http://kiyoandkei.bbs.fc2.com/
Re: Fails to boot after installation
Super Grub 2 iso now downloaded and written to CD, like you say very quick to download.
Boot to Super Grub2 Disk 1.99b1, select Detect any Operating System and:
Only OSs listed are:
I guess these correspond to my installed Win 2003 & Win 2008.
So for some reason Grub2 can't see either Debian which is on the same disk as Win 2008 or Arch which is on it's own disk.
Next option is to download Rescatux from Grub2, see if that works...
Nope that just freezes at Boot from CD/DVD:
What about just doing the Grub install bit from the Debian install DVD, let me try that...
Running Debian installer, select Install the GRUB boot loader on a hard disk, unfortunately this depends upon perviously performing Install the base system, which inturn depends upon partition didks, which depends upon detect disks. Argg... nope thats not going to work unless I reformat the partitions again and because there is no quick format option that takes hours.
Boot to Super Grub2 Disk 1.99b1, select Detect any Operating System and:
Code: Select all
error: unrecognised fs. - repeatyed 12 times
Code: Select all
Windows Vista (hd0,msdos1)
Windows Vista (hd1,msdos1)
So for some reason Grub2 can't see either Debian which is on the same disk as Win 2008 or Arch which is on it's own disk.
Next option is to download Rescatux from Grub2, see if that works...
Nope that just freezes at Boot from CD/DVD:
What about just doing the Grub install bit from the Debian install DVD, let me try that...
Running Debian installer, select Install the GRUB boot loader on a hard disk, unfortunately this depends upon perviously performing Install the base system, which inturn depends upon partition didks, which depends upon detect disks. Argg... nope thats not going to work unless I reformat the partitions again and because there is no quick format option that takes hours.
- kiyop
- Posts: 3983
- Joined: 2011-05-05 15:16
- Location: Where persons without desire to improve themselves fear to tread, in Japan
- Been thanked: 3 times
Re: Fails to boot after installation
Boot with Knoppix Live CD and download boot info script and execute it and post the contents of generated RESULTS.txt.
And execute the following in terminal and post the results, while booting with Knoppix Live CD.
EDIT at 12:50 2012/2/19 in JAPAN:
http://forums.debian.net/viewtopic.php? ... 81#p420799
Is there "grub rescue>" or so?
Can you type something or is it totally freeze (no response)?
And execute the following in terminal and post the results, while booting with Knoppix Live CD.
Code: Select all
sudo su
grub-install -v
http://forums.debian.net/viewtopic.php? ... 81#p420799
What is shown when you boot without live cd (knoppix)?NickC wrote:Completely fresh install of wheezy now completed. But won't even try to boot due to a GRUB error!
Is there "grub rescue>" or so?
Can you type something or is it totally freeze (no response)?
Openbox, JWM: Jessie, Sid, Arch / Win XP (on VirtualBox), 10
http://kiyoandkei.bbs.fc2.com/
http://kiyoandkei.bbs.fc2.com/
Re: Fails to boot after installation
Yes grub rescue> prompt but don't know where to go from there.
I have encountered this a few times now with other linux distros as well, it seems as if linux just can't co-exist happily in a multi disk environment. I have many disks in caddies which get plugged in and out depending on what I am doing that day. Coming from the windows world I have for many years just relied on being able to change the order of drives in the BIOS to choose which MBR to boot from, I just assumed that could still be done with linux. It appears not.
I have encountered this a few times now with other linux distros as well, it seems as if linux just can't co-exist happily in a multi disk environment. I have many disks in caddies which get plugged in and out depending on what I am doing that day. Coming from the windows world I have for many years just relied on being able to change the order of drives in the BIOS to choose which MBR to boot from, I just assumed that could still be done with linux. It appears not.
-
- Posts: 562
- Joined: 2011-06-02 15:55
- Location: Limassol, Cyprus
Re: Fails to boot after installation
If you have your disks properly setup (bootable), I see no reason why you cannot from the BIOS pointing to the disk you want. It is neither Linux nor Windows. It is a BIOS function calling the certain disk.being able to change the order of drives in the BIOS to choose which MBR to boot from, I just assumed that could still be done with linux
Being anonymous is the same as being an idiot.
Re: Fails to boot after installation
Let me try an example, first a single drive environment:
If I want to boot Windows I set hd0,0 as active/bootable, if I want to boot Debian I set hd0,1 as active/bootable. Actually not sure how to change the active partition to a linux one but come back to that later. For the moment hd0,1 is the bootable partition. This is the only drive in the system. menu.lst looks like this:
The root line actually points to the 'grub root' / 'linux boot' not the 'linux root'. Also the kernel line root= does not refer to the location of /vmlinuz-linux but to the actual linux root.
Now to add another disk to the system. Change drive order in BIOS so that Debian disk is top of the boot order.
Fails to boot: Unable to find root device /dev/sda4!
Boot to knoppix to see the disk & partition layout:
So clearly /dev/sda4 is now an NTFS partition.
If appears that grub & linux do not see disk drives in the same order as the BIOS boot order causing /dev/sda4 to point towards the wrong partition.
Code: Select all
hd0,0 = NTFS boot partition
hd0,1 = /Boot - this contains grub & vmlinuz-linux
hd0,2 = swap
hd0,3 = /
Code: Select all
# (0) Debian Linux
title Debian Linux
root (hd0,1)
kernel /vmlinuz-linux root=/dev/sda4 ro
initrd /initramfs-linux.img
Now to add another disk to the system. Change drive order in BIOS so that Debian disk is top of the boot order.
Fails to boot: Unable to find root device /dev/sda4!
Boot to knoppix to see the disk & partition layout:
Code: Select all
hd0,0 = NTFS
hd0,1 = NTFS
hd0,2 = NTFS
hd0,3 = NTFS
hd0,4 = NTFS
hd0,4 = NTFS
hd0,4 = NTFS
hd1,0 = NTFS boot partition
hd1,1 = Arch /Boot - this contains grub & vmlinuz-linux
hd1,2 = Arch swap
hd1,3 = Arch /
If appears that grub & linux do not see disk drives in the same order as the BIOS boot order causing /dev/sda4 to point towards the wrong partition.
- kiyop
- Posts: 3983
- Joined: 2011-05-05 15:16
- Location: Where persons without desire to improve themselves fear to tread, in Japan
- Been thanked: 3 times
Re: Fails to boot after installation
http://forums.debian.net/viewtopic.php? ... 63#p421714
But you can repair.
http://forums.debian.net/viewtopic.php? ... 63#p421662
http://forums.debian.net/viewtopic.php? ... 13#p421145
will help you.
http://forums.debian.net/viewtopic.php? ... 63#p421662
Furthermore Grub can detect partitions by using UUID, which is not affected by the order of HDDs.
I am confused after reading the following posts of yours.
http://forums.debian.net/viewtopic.php? ... 81#p420799
Was the disk containing the /(root) partition of debian installed connected to your PC when you checked the above?
I wonder if you misunderstand the current situation of your HDD.
How many media (internal HDD, external HDD, USB flash and so on) are connected to your computer now?
So I ask you again (to know the current situation),
http://forums.debian.net/viewtopic.php? ... 15#p421263
http://forums.debian.net/viewtopic.php? ... 63#p421714
You can easily change boot flag by for example, gparted or fdisk and so on.
But I prefer chainload to partition boot records by boot loader installed on the MBR of the HDD.
There are many good chainloader like MBM, PLoP, GAG, and so on.
You can even chainload by Grub2, Grub legacy, Grub4dos.
And menu.lst is used by Grub legacy (version 0.9...), which is not the same as Grub2 (version 1.9...), which is used by debian-6.0.4 or newer as default (? I may be wrong, because I have never used debian-wheezy installer CD).
In Grub legacy, the partition is numbered from "0" while it is numbered from "1" in Grub2.
And you should understand that Grub2 uses /boot/grub/grub.cfg instead of menu.lst and that "grub rescue>" prompt is only shown when Grub2 is used.
Even with Grub legacy, you can use UUID of partition. The command is "uuid".
instead of "root (hd0,1)". But, I used this "uuid" command on Ubuntu a few years ago. Maybe in Debian it is not effective, though I am not sure.
Grub2 can use UUID to detect the partition where grub2 modules and the configuration file (grub.cfg in debian) exist by "search --fs-uuid --set UUID_OF_PARTITION"
Please refer to:
http://ubuntuforums.org/showthread.php?t=1195275
Furthermore, you should replace "root=/dev/sda2" with "root=UUID=UUID_OF_/dev/sda2".
You can use "root=LABEL=LABEL_OF_/dev/sda2" instead of "root=UUID=...".
Please be noticed that "root=/dev/sda4" is not used by Grub itself, but is sent from Grub to kernel (vmlinuz-...) (as "kernel option") and the kernel use it.
And so,
http://forums.debian.net/viewtopic.php? ... 63#p421714
Sometimes.NickC wrote:If appears that grub & linux do not see disk drives in the same order as the BIOS boot order causing /dev/sda4 to point towards the wrong partition.
But you can repair.
http://forums.debian.net/viewtopic.php? ... 63#p421662
If the /(root) partition (and/or in some case, /boot partition) of debian can be recognized by Grub2 code (grub rescue), maybeNickC wrote:Yes grub rescue> prompt but don't know where to go from there.
http://forums.debian.net/viewtopic.php? ... 13#p421145
will help you.
http://forums.debian.net/viewtopic.php? ... 63#p421662
Grub can install its code on MBR and its code can try to read from the partition in the same HDD if you configure correctly, for example, you set your HDD (to the partition of which you install debian) recognized first, and you start installation and install grub onto the MBR of the HDD.NickC wrote:I have encountered this a few times now with other linux distros as well, it seems as if linux just can't co-exist happily in a multi disk environment. I have many disks in caddies which get plugged in and out depending on what I am doing that day. Coming from the windows world I have for many years just relied on being able to change the order of drives in the BIOS to choose which MBR to boot from, I just assumed that could still be done with linux. It appears not.
Furthermore Grub can detect partitions by using UUID, which is not affected by the order of HDDs.
I am confused after reading the following posts of yours.
http://forums.debian.net/viewtopic.php? ... 81#p420799
http://forums.debian.net/viewtopic.php? ... 15#p421150NickC wrote:Completely fresh install of wheezy now completed. But won't even try to boot due to a GRUB error! Is there some way to reinstall the GRUB bootloader only, I don't thing I have the energy to go through another four hour install again.
I have booted from Knoppix and established that I have the following partitions:
/dev/sda1 - ntfs
/dev/sda2 - ntfs
/dev/sda3 - extended
/dev/sda5 - ntfs
/dev/sda6 - ntfs
/dev/sda7 - ntfs
/dev/sdb1 - ntfs
/dev/sdb2 - extended
/dev/sdb5 - ext3, boot
/dev/sdb6 - linux-swap
/dev/sdb7 - root?
What do I need to do to install GRUB to /dev/sdb5?
Did you install debian? Where?NickC wrote:Super Grub 2 iso now downloaded and written to CD, like you say very quick to download.
Boot to Super Grub2 Disk 1.99b1, select Detect any Operating System and:Only OSs listed are:Code: Select all
error: unrecognised fs. - repeatyed 12 times
I guess these correspond to my installed Win 2003 & Win 2008.Code: Select all
Windows Vista (hd0,msdos1) Windows Vista (hd1,msdos1)
So for some reason Grub2 can't see either Debian which is on the same disk as Win 2008 or Arch which is on it's own disk.
Was the disk containing the /(root) partition of debian installed connected to your PC when you checked the above?
I wonder if you misunderstand the current situation of your HDD.
How many media (internal HDD, external HDD, USB flash and so on) are connected to your computer now?
So I ask you again (to know the current situation),
http://forums.debian.net/viewtopic.php? ... 15#p421263
after booting with only the HDD which contains the installed debian / partition.kiyop wrote:Boot with Knoppix Live CD and download boot info script and execute it and post the contents of generated RESULTS.txt.
And execute the following in terminal and post the results, while booting with Knoppix Live CD.Code: Select all
sudo su grub-install -v
http://forums.debian.net/viewtopic.php? ... 63#p421714
I can understand that the above-mentioned menu.lst works well for the situation where /boot is /dev/sda2 and / is /dev/sda4.NickC wrote:Let me try an example, first a single drive environment:If I want to boot Windows I set hd0,0 as active/bootable, if I want to boot Debian I set hd0,1 as active/bootable. Actually not sure how to change the active partition to a linux one but come back to that later. For the moment hd0,1 is the bootable partition. This is the only drive in the system. menu.lst looks like this:Code: Select all
hd0,0 = NTFS boot partition hd0,1 = /Boot - this contains grub & vmlinuz-linux hd0,2 = swap hd0,3 = /
The root line actually points to the 'grub root' / 'linux boot' not the 'linux root'. Also the kernel line root= does not refer to the location of /vmlinuz-linux but to the actual linux root.Code: Select all
# (0) Debian Linux title Debian Linux root (hd0,1) kernel /vmlinuz-linux root=/dev/sda4 ro initrd /initramfs-linux.img
You can easily change boot flag by for example, gparted or fdisk and so on.
But I prefer chainload to partition boot records by boot loader installed on the MBR of the HDD.
There are many good chainloader like MBM, PLoP, GAG, and so on.
You can even chainload by Grub2, Grub legacy, Grub4dos.
And menu.lst is used by Grub legacy (version 0.9...), which is not the same as Grub2 (version 1.9...), which is used by debian-6.0.4 or newer as default (? I may be wrong, because I have never used debian-wheezy installer CD).
In Grub legacy, the partition is numbered from "0" while it is numbered from "1" in Grub2.
And you should understand that Grub2 uses /boot/grub/grub.cfg instead of menu.lst and that "grub rescue>" prompt is only shown when Grub2 is used.
Even with Grub legacy, you can use UUID of partition. The command is "uuid".
Code: Select all
uuid UUID_OF_/dev/sda2
Grub2 can use UUID to detect the partition where grub2 modules and the configuration file (grub.cfg in debian) exist by "search --fs-uuid --set UUID_OF_PARTITION"
Please refer to:
http://ubuntuforums.org/showthread.php?t=1195275
Furthermore, you should replace "root=/dev/sda2" with "root=UUID=UUID_OF_/dev/sda2".
You can use "root=LABEL=LABEL_OF_/dev/sda2" instead of "root=UUID=...".
Please be noticed that "root=/dev/sda4" is not used by Grub itself, but is sent from Grub to kernel (vmlinuz-...) (as "kernel option") and the kernel use it.
And so,
http://forums.debian.net/viewtopic.php? ... 63#p421714
The above error is not due to Grub (kernel loader), but due to the bad kernel option "root=/dev/sda4" sent to kernel.NickC wrote:Now to add another disk to the system. Change drive order in BIOS so that Debian disk is top of the boot order.
Fails to boot: Unable to find root device /dev/sda4!
Openbox, JWM: Jessie, Sid, Arch / Win XP (on VirtualBox), 10
http://kiyoandkei.bbs.fc2.com/
http://kiyoandkei.bbs.fc2.com/