PDA

View Full Version : [ubuntu] Yet another grub problem



sirusgr
December 1st, 2010, 02:06 PM
Greetings to all , i updated ubuntu 10.10 and it messed up grub in the mbr so following some guides o googled i tried many guides but i couldnt get none to work. So my windows mentality which is still with me pushed me to delete al partitions and start a fresh installation now i get the grub command line every time i tried to boot my pc.
If someone can guide me through it i would be really happy!!
thanks in advance.

Hippytaff
December 1st, 2010, 02:15 PM
Hi and welcome

If you can boot from liveCD or USB and post the RESULTS.TXT generated by runnung the script here http://sourceforge.net/projects/bootinfoscript/
Then we can get some info about whats going on :-)

AngusH
December 1st, 2010, 02:15 PM
You need to have a working ubuntu install paired with your GRUB install. If you just boot a live cd and reinstall ubuntu (like you did for the original install) that should reinstall GRUB for you and fix things nicely.
Also for future reference we will normally be able to help you recover a broken install without a complete reinstall and if it comes to it we can show you how to reinstall in a safe way, so it's worth posting here before taking drastic steps.
Hope that helps
Angus

sirusgr
December 1st, 2010, 02:20 PM
Hi and welcome

If you can boot from liveCD or USB and post the RESULTS.TXT generated by runnung the script here http://sourceforge.net/projects/bootinfoscript/
Then we can get some info about whats going on :-)
i attached the results file as requested ! thanks for taking the time to help me out!

sirusgr
December 1st, 2010, 02:22 PM
You need to have a working ubuntu install paired with your GRUB install. If you just boot a live cd and reinstall ubuntu (like you did for the original install) that should reinstall GRUB for you and fix things nicely.
Also for future reference we will normally be able to help you recover a broken install without a complete reinstall and if it comes to it we can show you how to reinstall in a safe way, so it's worth posting here before taking drastic steps.
Hope that helps
Angus

i am currently on a live ubuntu cd and did reinstalled grub but that didnt fixed the problem :/ i followed one guide on how to update grub but that didnt work either!

Hippytaff
December 1st, 2010, 02:23 PM
I'm not on my ubuntu box right now so the formatting of the text file is all over the place.

If you can click new reply, paste the contents and then highlight the text and press the # icon at the top of the text box then post it, it will wrap the text for easy reading.

By the way, am I right in thinking you reinstalled ubuntu after you deleted the partitions? Else as AngusH said you need to install ubuntu :-)

Zimmer
December 1st, 2010, 02:24 PM
Are you certain it is the GRUB prompt?

Where did you install GRUB to (GRUB2, I assume as it is 10.10) ? The MBR or the Ubuntu partition

My first suggestion (as I am unsure which prompt you have dropped to) would be to use the LiveCD and install GRUB2 to the MBR of your drive with instructions from here

https://help.ubuntu.com/community/Grub2?action=show&redirect=GRUB2
the section headed Reinstalling GRUB2, which is quite a way down the page...

AngusH
December 1st, 2010, 02:24 PM
i am currently on a live ubuntu cd and did reinstalled grub but that didnt fixed the problem :/ i followed one guide on how to update grub but that didnt work either!
I'm not asking you to reinstall GRUB, I saying that you should reinstall Ubuntu itself. GRUB CANNOT WORK without a linux file system holding a /boot folder. When you formatted the drive you removed that. You need to put it back. Reinstalling Ubuntu will do that.
Angus

sirusgr
December 1st, 2010, 02:24 PM
I'm not on my ubuntu box right now so the formatting of the text file is all over the place.

If you can click new reply, paste the contents and then highlight the text and press the # icon at the top of the text box then it will wrap the text for easy reading.

By the way, am I right in thinking you reinstalled ubuntu after you deleted the partitions? Else as AngusH said you need to install ubuntu :-)

yes i did reinstall ubuntu after i deleted the partitions. everything went smoothly up untill i got the msg that the boot loader couldnot be installed and i tried to do it manually


Boot Info Script 0.55 dated February 15th, 2010

============================= Boot Info Summary: ==============================

=> Grub 2 is installed in the MBR of /dev/sda and looks on the same drive in
partition #1 for (,msdos1)/boot/grub.

sda1: __________________________________________________ _______________________

File system: ext4
Boot sector type: -
Boot sector info:
Operating System:
Boot files/dirs: /boot/grub/core.img

sda2: __________________________________________________ _______________________

File system: Extended Partition
Boot sector type: -
Boot sector info:

sda5: __________________________________________________ _______________________

File system: ext4
Boot sector type: -
Boot sector info:
Operating System: Ubuntu 10.10
Boot files/dirs: /etc/fstab

sda3: __________________________________________________ _______________________

File system: swap
Boot sector type: -
Boot sector info:

sda4: __________________________________________________ _______________________

File system: ext4
Boot sector type: -
Boot sector info:
Operating System:
Boot files/dirs:

=========================== Drive/Partition Info: =============================

Drive: sda ___________________ __________________________________________________ ___

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition Boot Start End Size Id System

/dev/sda1 2,048 194,559 192,512 83 Linux
/dev/sda2 196,606 39,256,063 39,059,458 5 Extended
/dev/sda5 196,608 39,256,063 39,059,456 83 Linux
/dev/sda3 39,256,064 43,161,599 3,905,536 82 Linux swap / Solaris
/dev/sda4 43,161,600 72,458,239 29,296,640 83 Linux


blkid -c /dev/null: __________________________________________________ __________

Device UUID TYPE LABEL

/dev/loop0 squashfs
/dev/sda1 a958ab6e-0ce7-407a-999f-15f96fd3d16a ext4
/dev/sda2: PTTYPE="dos"
/dev/sda3 d0634cb9-4d9b-4c02-a7c4-6024849e7707 swap
/dev/sda4 5470d042-f61d-492e-befe-8eaa490ad97f ext4
/dev/sda5 035dd59f-de12-4dcd-af61-546e3d8ec513 ext4
/dev/sda: PTTYPE="dos"

============================ "mount | grep ^/dev output: ===========================

Device Mount_Point Type Options

aufs / aufs (rw)
/dev/sr0 /cdrom iso9660 (ro,noatime)
/dev/loop0 /rofs squashfs (ro,noatime)


=================== sda1: Location of files loaded by Grub: ===================


.0GB: boot/grub/core.img
.0GB: initrd.img-2.6.35-22-generic
.0GB: vmlinuz-2.6.35-22-generic

=============================== sda5/etc/fstab: ===============================

# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
/dev/sda5 / ext4 errors=remount-ro 0 1
# /boot was on /dev/sda1 during installation
UUID=a958ab6e-0ce7-407a-999f-15f96fd3d16a /boot ext4 defaults 0 2
# /home was on /dev/sda4 during installation
UUID=5470d042-f61d-492e-befe-8eaa490ad97f /home ext4 defaults 0 2
# swap was on /dev/sda3 during installation
UUID=d0634cb9-4d9b-4c02-a7c4-6024849e7707 none swap sw 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0

Hippytaff
December 1st, 2010, 02:25 PM
Boot Info Script 0.55 dated February 15th, 2010

============================= Boot Info Summary: ==============================

=> Grub 2 is installed in the MBR of /dev/sda and looks on the same drive in
partition #1 for (,msdos1)/boot/grub.

sda1: __________________________________________________ _______________________

File system: ext4
Boot sector type: -
Boot sector info:
Operating System:
Boot files/dirs: /boot/grub/core.img

sda2: __________________________________________________ _______________________

File system: Extended Partition
Boot sector type: -
Boot sector info:

sda5: __________________________________________________ _______________________

File system: ext4
Boot sector type: -
Boot sector info:
Operating System: Ubuntu 10.10
Boot files/dirs: /etc/fstab

sda3: __________________________________________________ _______________________

File system: swap
Boot sector type: -
Boot sector info:

sda4: __________________________________________________ _______________________

File system: ext4
Boot sector type: -
Boot sector info:
Operating System:
Boot files/dirs:

=========================== Drive/Partition Info: =============================

Drive: sda ___________________ __________________________________________________ ___

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition Boot Start End Size Id System

/dev/sda1 2,048 194,559 192,512 83 Linux
/dev/sda2 196,606 39,256,063 39,059,458 5 Extended
/dev/sda5 196,608 39,256,063 39,059,456 83 Linux
/dev/sda3 39,256,064 43,161,599 3,905,536 82 Linux swap / Solaris
/dev/sda4 43,161,600 72,458,239 29,296,640 83 Linux


blkid -c /dev/null: __________________________________________________ __________

Device UUID TYPE LABEL

/dev/loop0 squashfs
/dev/sda1 a958ab6e-0ce7-407a-999f-15f96fd3d16a ext4
/dev/sda2: PTTYPE="dos"
/dev/sda3 d0634cb9-4d9b-4c02-a7c4-6024849e7707 swap
/dev/sda4 5470d042-f61d-492e-befe-8eaa490ad97f ext4
/dev/sda5 035dd59f-de12-4dcd-af61-546e3d8ec513 ext4
/dev/sda: PTTYPE="dos"

============================ "mount | grep ^/dev output: ===========================

Device Mount_Point Type Options

aufs / aufs (rw)
/dev/sr0 /cdrom iso9660 (ro,noatime)
/dev/loop0 /rofs squashfs (ro,noatime)


=================== sda1: Location of files loaded by Grub: ===================


.0GB: boot/grub/core.img
.0GB: initrd.img-2.6.35-22-generic
.0GB: vmlinuz-2.6.35-22-generic

=============================== sda5/etc/fstab: ===============================

# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
/dev/sda5 / ext4 errors=remount-ro 0 1
# /boot was on /dev/sda1 during installation
UUID=a958ab6e-0ce7-407a-999f-15f96fd3d16a /boot ext4 defaults 0 2
# /home was on /dev/sda4 during installation
UUID=5470d042-f61d-492e-befe-8eaa490ad97f /home ext4 defaults 0 2
# swap was on /dev/sda3 during installation
UUID=d0634cb9-4d9b-4c02-a7c4-6024849e7707 none swap sw 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0

Hippytaff
December 1st, 2010, 02:30 PM
I can't see anything wrong with that, but I'm not an expert, others will be along shortly who know volumes more than me, but out of curiosity what graphics card do you have?

sirusgr
December 1st, 2010, 02:33 PM
I can't see anything wrong with that, but I'm not an expert, others will be along shortly who know volumes more than me, but out of curiosity what graphics card do you have?i use the 9800 gt

AngusH
December 1st, 2010, 02:35 PM
yes i did reinstall ubuntu after i deleted the partitions. everything went smoothly up untill i got the msg that the boot loader couldnot be installed and i tried to do it manually

That's a very serious error in itself. It really shouldn't happen.
Secondly I'm not sure how you'd fix it, but it appears that GRUB is looking in the wrong place for it's config file, normally it would be on the same partition as Ubuntu itself. Can I ask what you made the /dev/sda1 partition for? I can't really see what it is.

Hippytaff
December 1st, 2010, 02:40 PM
Nvidia!? :-)

you might need to select nomodset, however wait for more experienced eyes to look over your results.txt file




hit F6 and then Esc to see the boot line

file=/cdrom/preseed/ubuntu.seed boot=casper initrd=/casper/initrd.lz quiet splash --

and change to

file=/cdrom/preseed/ubuntu.seed boot=casper initrd=/casper/initrd.lz nomodeset --

Now hit Enter.

You may have to toggle the F6 option a bit (do it first etc.).


If this works you might have to look into downloading the latest Nvidia driver for the Nvidia card to work, if not post back :-)

sirusgr
December 1st, 2010, 02:44 PM
That's a very serious error in itself. It really shouldn't happen.
Secondly I'm not sure how you'd fix it, but it appears that GRUB is looking in the wrong place for it's config file, normally it would be on the same partition as Ubuntu itself. Can I ask what you made the /dev/sda1 partition for? I can't really see what it is.


i used sda1 as a boot , i used the following order while creating the partitions in the wizard of ubuntu installation, 1st one boot second one swap 3rd for / 4th as home and left the rest of the free space for future windows installation, but when i look at the results i see the sda43 as swap i hope that makes sense :/

i was trying all night trying to figure out what is wrong with it, im kinda desperate

sirusgr
December 1st, 2010, 03:20 PM
/bump

any thoughts ?:/

oldfred
December 1st, 2010, 06:11 PM
You do not have a grub.cfg, so grub has not fully installed. It also looks like you have a separate /boot as the boot files are in sda1 (but maybe not all of them) and fstab is in sda5.

I typically do not recommend a separate /boot as it is rarely required for desktops now. Only if you have an old system with the 137GB BIOS limit or are running servers with RAID or LVM may you need a separate /boot.

Most instructions on reinstalling grub do not mention mounting /boot as part of the reinstall or add it as a footnote that is easily missed. Everything you do now with a separate /boot has to have an extra command to also mount the /boot partition to do any repairs.

While normally I like to work on fixing things (We will spend days repairing a system), you probably can reinstall in about an hour and install without a /boot.

Also you do not have the boot flag on a primary partition. Grub does not use the boot flag. Windows requires a boot flag, but some BIOS do not know you are not running windows and will not let you boot anything without that boot flag on a primary. I would add one even though you probably do not need it.

A suggestion partition layout:
Ubuntu's standard install is just / & swap, but it is better to add another partition for /home:
1. 10-20 GB Mountpoint / primary beginning ext4(or ext3)
2. all but 2 GB Mountpoint /home logical beginning ext3(or ext4)
3. 2 GB Mountpoint swap logical

Everyone has their own recommendations on partitions and none are really wrong. It depends greatly on how you use system and even over time your needs will change and so will how you may 'best' partition system.