LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Broken Dual boot - xp/ub, err msg-> grub rescue (https://www.linuxquestions.org/questions/linux-newbie-8/broken-dual-boot-xp-ub-err-msg-grub-rescue-881962/)

jazzisjazz 05-21-2011 11:29 AM

Broken Dual boot - xp/ub, err msg-> grub rescue
 
*** Revised information ***
Ubuntu 9.10 was set up to handle the booting selection - previously I thought it was xp but Ubuntu 9.10 "did" it.

Howdy all.

I am still a newbie to linux and hope you guys can help me fix
a pc for a client.

The system started out as a xp / ubuntu 9.10 dual boot on a 400gb drive.
xp has 210gb, ub has 80 and their is a 100gb shared storage.
Xp was installed first and then I followed a guide over at linuxconfig.org to get ub installed so that I could select which OS was wanted at boot. Ubuntu manages the boot up menu (Went back to look at my notes from the original setup)

The owner tried to update to ub 11.04 and afterall was said and done the machine now boots to the message

error file not found

grub rescue

I can't say if 11.04 was properly installed or not.

Ask whatever you like and I'll give the best answer I can.

I think the xp install is okay but I can't say for certain as I don't know how to boot it outside the bootmanager at startup.

Data has been saved so if I have to blow it all away and start over I can but I'm hoping I won't have to.

Any help is appreciated.

allied air 05-21-2011 11:47 AM

there is a way to fix the installation, and this is a place holder till i switch to a machine which has my own log of how I did so and post how :D

yancek 05-21-2011 01:58 PM

Quote:

I "think" it uses the windows bootmanager but I am not certain.
Did you or your client manually configure xp to boot both xp and Ubuntu by creating a file containing the first 52 bytes of the Ubuntu partition, then move that file to the root of the C:\ drive, then put an entry for Ubuntu in the xp boot.ini file?

That would be necessary to boot Ubuntu from xp.

It would be necessary to know which bootloader is used to boot. I think you are going to need to talk to your client and get more information. If he upgraded to 11.04, what happened? Does he know where he installed the Grub bootloader? To the mbr? to the Ubuntu partition? When does he get the file not found message? On boot? after he selects Ubuntu?

Quote:

I can't say if 11.04 was properly installed or not
Doesn't seem like it, at least not the bootloader. More information is needed if you want help.

jazzisjazz 05-24-2011 02:57 PM

Ubuntu 9.10 originally handled the boot up - sorry for the misinfo
 
1 Attachment(s)
Ubuntu 9.10 originally handled the boot up - sorry for the misinfo.

Below is the grub.cfg (I opened a copy in Windows Wordpad - I'm hoping it displays without any formatting issues)

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s /boot/grub/grubenv ]; then
have_grubenv=true
load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
saved_entry=${prev_saved_entry}
save_env saved_entry
prev_saved_entry=
save_env prev_saved_entry
fi
if [ ${recordfail} = 1 ]; then
set timeout=-1
else
set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/white
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry "Ubuntu, Linux 2.6.31-14-generic" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
set quiet=1
insmod ext2
set root=(hd0,2)
search --no-floppy --fs-uuid --set 4e610b76-93bb-4501-8b23-799f1fff1f5b
linux /boot/vmlinuz-2.6.31-14-generic root=UUID=4e610b76-93bb-4501-8b23-799f1fff1f5b ro quiet splash
initrd /boot/initrd.img-2.6.31-14-generic
}
menuentry "Ubuntu, Linux 2.6.31-14-generic (recovery mode)" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
insmod ext2
set root=(hd0,2)
search --no-floppy --fs-uuid --set 4e610b76-93bb-4501-8b23-799f1fff1f5b
linux /boot/vmlinuz-2.6.31-14-generic root=UUID=4e610b76-93bb-4501-8b23-799f1fff1f5b ro single
initrd /boot/initrd.img-2.6.31-14-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Microsoft Windows XP Professional (on /dev/sda1)" {
insmod ntfs
set root=(hd0,1)
search --no-floppy --fs-uuid --set 204024f14024cefa
drivemap -s (hd0) ${root}
chainloader +1
}
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

A screenshot of the boot folder contents is attached below.

yancek 05-24-2011 05:31 PM

Quote:

The owner tried to update to ub 11.04
Actually, that's not an update. It is an upgrade and there are major differences. An update will make minor or major revisions to some programs/libraries, etc. or do security updates. An upgrade is a new version of the operating system and involves some major changes. If everything is working and you have things setup the way you want, there is no reason to upgrade until support is no longer available.

The grub.cfg shows your xp on the first partition of the first drive and Ubuntu on the second partition of that drive.
So what we would need now is partition information, or you can check this. Using the Ubuntu CD, boot it and open the terminal and run the command: sudo fdisk -l (lower case letter L in the command) and check to see if sda1 is an ntfs partition and sda2 is Linux.

What is the current status of the machine? Is s/he able to boot xp, Ubuntu, neither? Is the file not found error before the menu selection screen or after selecting Ubuntu?

jazzisjazz 05-24-2011 06:00 PM

Thanks for making the terms clear.
sda1 is ntfs and sda2 is linux
the error message is seen without seeing a menu selection screen first
Neither OS boots
At the moment I am responding from the machine using a bootable 11.04 on CD-r.
Thanks for the help so far.

The sudo fdisk -l response is below

Device Boot Start End Blocks Id System
/dev/sda1 * 1 25497 204804621 7 HPFS/NTFS
/dev/sda2 25498 35223 78124095 83 Linux
/dev/sda3 35224 35831 4883760 82 Linux swap / Solaris
/dev/sda4 35832 47989 97659135 5 Extended
/dev/sda5 35832 47989 97659103+ b W95 FAT32

yancek 05-24-2011 10:48 PM

Check Section 13 at this site to install Grub2 to mbr:

https://help.ubuntu.com/community/Grub2#SIMPLEST - Copy GRUB 2 Files from the LiveCD

Boot the Ubuntu CD.
Open a terminal and create a mount point for your Ubuntu partition:

Quote:

sudo mkdir /mnt/sda2
Then mount it:

Quote:

sudo mount /dev/sda2 /mnt/sda2
Install Grub2:

Quote:

sudo grub-install --root-directory=/mnt/sda2 /dev/sda
Above is the first option from that page. If it doesn't work, try one of the other methods.

jazzisjazz 05-26-2011 12:47 PM

https://help.ubuntu.com/community/Grub2#SIMPLEST

used instructions to fix grub2

now booting into 9.10 ( 2.6.31-14generic)

xp install is just fine

apparently the xp bootloader does know about the ub install because its in the xp bootloader menu after selecting MS Windows XP in the ub bootloader.

OK. Wonderful. Thanks. Now....

Whats the best way to go about upgrading to 11.04 since 9.10 support has just ended?

mostlyharmless 05-26-2011 03:12 PM

Save the user data, delete the ubuntu partitions using Windows disk manager, install 11.04 in the now unused space, reinstall the user data.

jazzisjazz 05-26-2011 08:44 PM

Using 11.04
No Data to save.
Deleted Ub partitons from WinXP.
Started UB11.04 cd.
Manual Config.
Editing 1st primary, no format,ntfs, mount point windows (In 9.04 mount point was /mnt/win_C)
Creating 2nd primary for Ub 11.04, formating Ext3, mount point /.
Creating swap, no mount point in droplist.
Creating shared, formating FAT32, mount point windows.(In 9.04 mount point was /mnt/shared )

Am I correct that the mount point changes are just changes in wording and I can begin the install now or have I missed something?

yancek 05-26-2011 10:36 PM

Quote:

Editing 1st primary, no format,ntfs, mount point windows (In 9.04 mount point was /mnt/win_C)
Are you referring to what you see in GParted, the partition editor where you can create, add or change partitions?
Usually the partitions are in the /mnt directory but it is not necessary. Is the windows mount point in root? /windows
Should not matter. You can change it by clicking the partition in the main window to highlight it and click the Change tab to get the Edit window.

The default for Ubuntu filesystem is ext4 but I don't believe it will matter.
There is no mount point for swap.

mostlyharmless 05-27-2011 07:33 AM

Sounds good to me, btw you don't need fat32 for shared. Ntfs-3 does fine with ntfs, and ext2fs for Windows can read ext3, usually.. ( depending on inode size )

Hevithan 05-27-2011 07:48 AM

Quote:

Originally Posted by jazzisjazz (Post 4367854)
Whats the best way to go about upgrading to 11.04 since 9.10 support has just ended?

I just read a post earlier on this same subject ... This is not something I know for fact or from experience, but it made sense and may be worth pondering upon in the future.

The post I read said something along the lines of:
When doing in upgrade to ubuntu, if possible try to do it in order.
So for example you would go from 9.10 to 10.04 to 10.10 to 11.04 (I do not know if those are the correct versions ... Just an example)
That way you don't miss important changes (such as a new grub) ... Just thought I'd pass that along.
Of course Mostlyharmless's method seems quicker
Quote:

Save the user data, delete the ubuntu partitions using Windows disk manager, install 11.04 in the now unused space, reinstall the user data.

jazzisjazz 05-27-2011 07:59 AM

**Are you referring to what you see in GParted, the partition editor where you can create, add or change partitions?**

If the partitioning setup you go thru when you select manual set up after choosing the install option on the Live Ub 11.04 CD is called GParted then yes.

Where windows was chosen in the previous post only dos and windows were the available options.

Should there have been others?

If the menu choices had been the same - the items I put in parenthesis in the pervious post - I would have picked them.

You can see the tutorial I went through to set up 9.10 here:

http://linuxconfig.org/how-to-dual-b...d-ubuntu-linux

I had thought the choices would be the same to install 11.04 but as I have noted ( unless something is wrong )they don't appear to be.

Hope this clears things up.

So if I use the selections I previously listed including the change to ext4 for the Ub partition, Am I good to go?


**Usually the partitions are in the /mnt directory but it is not necessary. Is the windows mount point in root? /windows **

Yes. I wasn't paying enough attention to the / in front of windows but it is there in the menu.

**Should not matter. You can change it by clicking the partition in the main window to highlight it and click the Change tab to get the Edit window.**

**The default for Ubuntu filesystem is ext4 but I don't believe it will matter.
There is no mount point for swap.[/QUOTE]**

yancek 05-27-2011 10:58 AM

Quote:

Where windows was chosen in the previous post only dos and windows were the available options.
I'm not sure what you are referring to here? Could you post an image of the window?

Quote:

If the menu choices had been the same - the items I put in parenthesis in the previous post - I would have picked them.
Are you referring to the drop-down menu in GParted to the right of Mount Point? You don't need to select any of them. You can type in an entry of you want. Usually, when you click the down arrow to the right and the drop-down box opens, the first line is empty, type there. If it shows windows, no reason you could not use that. I'm not really sure if this is what you are referring to so clarify. If it is the Mount point, when you open your file manager and navigate to the root of your filesystem, you should see windows and be able to click on it to access those files. That is where your windows partition will be mounted in Ubuntu.

Also, when quoting someone use the QUOTE tab at the top of this text box, small yellow icon - third from the right. Easier to read and separate quotes from comments/questions.

If you are still not sure, post back.
Just re-read your posts. You still have xp on the machine? If so, make sure you do not format the xp partition and it delete data.
Also, as Hevithan noted, it is usually not a good idea to skip upgrades such as going from 9.10 to 11.04 as your friend did. You might get lucky, but this usually leads to problems. I'm assuming you are doing a fresh install of Ubuntu 11.04, correct?


All times are GMT -5. The time now is 03:22 AM.