LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Unable to load GRUB on cold boot (https://www.linuxquestions.org/questions/linux-newbie-8/unable-to-load-grub-on-cold-boot-668144/)

vin.driesel 09-07-2008 09:21 AM

Unable to load GRUB on cold boot
 
Hi,

I'm having a problem with loading GRUB on my notebook.
I'm dual booting Ubuntu 8.04 and Windows Vista Ultimate 64-bit.
The problem occurs only when 'cold booting' (when my notebook hasn't run for a while).

I get this message (no errors):
Code:

GRUB loading stage 1.5
Nothing happens after this.
When I do a hard reset I get this:
Code:

GRUB loading stage 1.5
GRUB loading, please wait ...

...And GRUB loads normally and my menu.lst entries are shown.
I do NOT have this problem when I reboot in Linux or Windows afterwards (in other words, while my notebook is running).

Having to hard reboot my notebook every time I turn it on is slowly driving me crazy.
Since I'm not an advanced linux user and certainly not familiar with GRUB I'm calling the help from those who are. I don't even know that this problem is BIOS/GRUB related.
I'm willing to cooperate in terms of supplying file content etc.


greetings,
vin.driesel

jay73 09-07-2008 09:27 AM

OK, you asked for it. ;)
Please post your /boot/grub/menu.lst and the output of sudo fdisk -l.

vin.driesel 09-07-2008 09:35 AM

/boot/grub/menu.lst
Code:

default 4
timeout 10
color white/green yellow/blue

title Debian GNU/Linux, kernel 2.6.24-19-generic
root (hd0,2)
kernel /boot/vmlinuz-2.6.24-19-generic root=UUID=8b41306f-0e22-44b0-839b-01339e9ab70d ro quiet splash
initrd /boot/initrd.img-2.6.24-19-generic
savedefault

title Debian GNU/Linux, kernel 2.6.24-19-generic (recovery mode)
root (hd0,2)
kernel /boot/vmlinuz-2.6.24-19-generic root=UUID=8b41306f-0e22-44b0-839b-01339e9ab70d ro single
initrd /boot/initrd.img-2.6.24-19-generic
savedefault

title Debian GNU/Linux, kernel memtest86+
root (hd0,2)
kernel /boot/memtest86+.bin

title Other operating systems:
root

title Windows Vista/Longhorn (loader)
root (hd0,0)
chainloader +1
savedefault
makeactive

sudo fdisk -l
Code:

Schijf /dev/sda: 160.0 GB, 160041885696 bytes
255 koppen, 63 sectoren/spoor, 19457 cilinders
Eenheid = cilinders van 16065 * 512 = 8225280 bytes
Schijf-ID: 0xd6a1d6a1

 Apparaat Opstart  Begin      Einde    Blokken  ID  Systeem
/dev/sda1  *          1      11096    89128588    7  HPFS/NTFS
/dev/sda2          11097      15377    34387132+  5  Uitgebreid
/dev/sda3          15378      19457    32772600  83  Linux
/dev/sda5          11097      13055    15735636    7  HPFS/NTFS
/dev/sda6          13056      13553    4000153+  82  Linux wisselgeheugen
/dev/sda7          13554      15377    14651248+  83  Linux

GParted screen:
GParted screen

pixellany 09-07-2008 09:58 AM

I'm getting confused by the terminology.

To me, "cold boot", "cold reboot", and "hard reset" would all be the same thing---meaning that the computer was completely powered off and then re-started.

Does the system work if you turn off power and then start up cold? If not, then what exactly do you do then to make it work?

I have a vague memory that spaces in the menu.lst title field can cause problems. I can't, however, see how it might relate to your symptoms.



PS: I love your language----- "wisselgeheugen" is so much more elegant than "swap" ......;)

vin.driesel 09-07-2008 10:05 AM

Yeah, I'm sorry for the mixed up terminolgy.
But when I say 'cold', I really mean 'not warm' ;), when the computer hasn't run for a while.
With 'hard reset' I mean resetting using the power button.

I hope this clears things up.
btw, 'wisselgeheugen' is Dutch for swap ;).

Quote:

Does the system work if you turn off power and then start up cold? If not, then what exactly do you do then to make it work?
After I get the 'GRUB loading stage 1.5' message I push my power button to turn my NB off and then press it again. This makes my NB boot just normally each time I do this.
Also when I quit Vista or linux and do a restart, my NB boots perfectly normal.

jay73 09-07-2008 10:08 AM

Is that gparted image correct? It does not seem to agree with the output of fdisk -l. Also, it shows / as a JFS filesystem. JFS is known to have issues with GRUB (just like XFS, by the way). If you want to use JFS, you need to create a separate ext2 or ext3 boot partition. The alternative is to use ext3 for /.

pixellany 09-07-2008 10:12 AM

But, how about my key question?

Does the system work if you turn off power and then start up cold? If not, then what exactly do you do then to make it work?


Quote:

btw, 'wisselgeheugen' is Dutch for swap
I think I figured that out!! I'll bet it is used in ways that would lead to an amusing literal translation into English when used to refer to swap space on a disk...;)

vin.driesel 09-07-2008 10:15 AM

Quote:

Originally Posted by jay73 (Post 3272394)
Is that gparted image correct? It does not seem to agree with the output of fdisk -l. Also, it shows / as a JFS filesystem. JFS is known to have issues with GRUB (just like XFS, by the way). If you want to use JFS, you need to create a separate ext2 or ext3 boot partition. The alternative is to use ext3 for /.

Is it possible to:
  1. keep my current JFS partition and create an ext3 boot partition?
  2. convert my JFS partitions to ext?

Quote:

Does the system work if you turn off power and then start up cold? If not, then what exactly do you do then to make it work?
Yes, when powering off completely and rebooting instantly GRUB loads perfectly.

jay73 09-07-2008 10:57 AM

OK, this thread appears to be heading in two directions. Maybe Pixellany knows something that I don't, something that may provide a fix that does not involve the copy and edit that would be required to create the boot partition. If it's only a matter of a boot option or so, it would definitely be more convenient. I'll keep an eye on this thread and it the issue doesn't get solved, I'll post more details (unless you want them now, of course).

vin.driesel 09-07-2008 11:11 AM

Well, I sort of regretted not having a separate boot partition, so now might be a good opportunity to do so.
So if you don't mind I would like to fix this asap.

jay73 09-07-2008 01:19 PM

OK. But first ask yourself whether it wouldn't be more convenient to do a reinstall. That would take half an hour while editing an installed system will take about as long - if not longer - and holds plenty of opportunities to mess up badly. Then you'll find yourself reinstalling anyway.

Now, here is how you can do it. All of these steps need to be executed from a livecd, not from inside a running system.
1) free up some space to create a boot partition. I would suggest that you chip a bit off your swap partition.
Pop in your livecd and start gparted. Select the swap partition and delete it. Create two new partitions, one for boot and the other for swap. Format boot to ext3, swap as linux-swap. This will leave your partitions in a disordered state, which you can solve by running the command
sudo fdisk /dev/sda
and entering the commands x, then f, then w. Type m if you would like to see what these letters are supposed to do.
2) now we'll move the data. Open up a terminal and run sudo fdisk -l just so you can see how your partitions are identified.
Now enter these commands:
sudo mkdir /mnt/from
sudo mkdir /mnt/to
sudo mount /dev/sda[?] /mnt/from <---- replace ? with thenumber of your root partition
sudo mount /dev/sda[?] /mnt/to <---- replace ? with the number of your newly created boot partition
Now that your / and /boot partitions are mounted, you can start copying.
cd /mnt/from/boot
sudo cp -vax * /mnt/to
When the prompt returns, the data have been written. Just to make sure, perform a check:
ls -al /mnt/to
This should look exactly like the contents of your original boot partition.
3) Now we'll move the original boot partition out of the way.
cd /mnt/from
cp -R boot boot_bak
The contents of boot are now saved in book_bak so you have a backup. This can be removed after a few days but it is recommended to leave it there until you are sure that everything is working properly.
4) unmount your new boot partition
sudo umount /mnt/to
5) I suggest that you give your new boot partition a label or generate a new UUID. To write a label:
sudo tune2fs -L Ubu_boot /dev/sda? <---- number of new boot partition here
If you use neither a label nor a UUID, you'll need to use the device in menu.lst and fstab.
6) remount the new boot partition and edit your menu.lst
sudo mount /dev/sda[?] /mnt/to
cd /mnt/to
sudo gedit grub/menu.lst
Replace root=UUID=XXXXXXXXXXXXXXXXXXXX with root=LABEL=Ubu_boot
(or the new UUID if you use that instead)
7) unmount it again:
cd
sudo umount /mnt/to
8) Label swap:
sudo mkswap - L swap
8) Edit your /etc/fstab so that it knows about your new boot and swap partitions:
sudo gedit /mnt/from/etc/fstab
Add a line like this:
LABEL=Ubu_boot /boot ext3 noatime,nodiratime 0 2
And edit the swap line:
replace the UUID=XXXXXXXXXXXXXXXXXx with LABEL=swap
9) unmount your root partition:
umount /mnt/from
That was it. You can now reboot. Don't worry if something appears to be wrong, you still have a backup.

aus9 09-08-2008 08:15 AM

I will just add my aussie 2.5 cents on this part of the menu
title Other operating systems:
root

title Windows Vista/Longhorn (loader)
root (hd0,0)
chainloader +1
savedefault
makeactive

The first part is useless. Not sure what Debian was attempting but do not select it pls

The second part has the line savedefault in it....I suggest if you keep current system, use root powers to delete that entire line.

What it means is...if you ever boot into vista...change whatever default line was to 4.
IMHO you are better off with the top line
default 4 and no savedefault line....you will see vista hightlighted as the option to boot.

Minor issue change that timeout to 3 as most people can press a key to change boot order in 3 seconds...oops sorry I mean most linux users heh heh


All times are GMT -5. The time now is 08:33 AM.