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 When I do a hard reset I get this: Code:
GRUB loading stage 1.5 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 |
OK, you asked for it. ;)
Please post your /boot/grub/menu.lst and the output of sudo fdisk -l. |
/boot/grub/menu.lst
Code:
default 4 Code:
Schijf /dev/sda: 160.0 GB, 160041885696 bytes GParted screen |
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" ......;) |
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:
Also when I quit Vista or linux and do a restart, my NB boots perfectly normal. |
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 /.
|
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:
|
Quote:
Quote:
|
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).
|
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. |
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. |
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. |