View Full Version : Dual Boot with Ubuntu mistake
anlgalways
6th February 2009, 12:33 AM
I was running Ubuntu 8.10 on a Lenovo T61. I decided that I wanted to switch to Fedora gradually so I proceeded to install Fedora 10 with the intention of creating a dual boot system with Ubuntu. I chose the option that consolidates the space used on the disk already and then puts that in a separate partition and then creates a new partition for Fedora. I can't recall if I chose some options for the boot loader. Fedora booted and ran without any problems after the install however I am not able to boot into Ubuntu. I went into the BIOS configuration for my computer on startup and it didn't list the Ubuntu partition as bootable. It is however recognized by the BIOS. I even tried putting Ubuntu higher in the boot order but it just skips it and goes to Fedora.
The other odd thing is that in Fedora, I cannot mount the Ubuntu partition. It is clearly recognized but when I try to mount it, it gives me the following error:
Mount: wrong fs type, bad option, bad superblock on /dev/sda1, missing codepage or helper program, or other error in some cases useful info is found in syslog - try dmesg | tail or so
Another error comes up in another window saying:
Unable to mount 41.9 GB Media
DBus error org.freedesktop.DBus.Error.NoReply: Did not reviece a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
I really do not understand what these errors mean as I am a bit of a Linux Newbie. Any help would be appreciated.
Thanks in advance.
glennzo
6th February 2009, 12:41 AM
If you can post the output of the commands /sbin/fdisk -l and cat /boot/grub/menu.lst it would be very helpful. Use sudo or a root log in.
Edit: I'll be away from the computer for a while so I may not respond right away. Others can pick up from here though.
PatMcLJr
6th February 2009, 03:20 AM
This happens a lot.
Fedora for some reason does not provide for other Linux installs when it configures grub. But it usually picks up any Windows installs with out a problem. If you can find a rescue disk to boot from you can dig around and grab the bits you need from your ubuntu /boot/grub/menu.lst and put that in your Fedora grub.conf you might need to adjust the default boot number 0, 1, 2 ... it goes by the title and 0 counts as the first one, or that's what I recall anyway. The ubuntu install should still be there on the disk. One disk, two, three? It might be an issue if you have more then one disk drive. But you should be able to fix it.
Best of Luck,
Pat Jr.
scottro
6th February 2009, 03:37 AM
For future reference....
It's usually best (if you're not using Windows) to install Fedora first. Then, when installing Ubuntu, choose to put grub in the root partition of the Ubuntu installation. Then, in Fedora you just add rootnoverify, chainloader +1 (syntax isn't exactly correct, this is for purpose of general explanation) and it goes to the Ubuntu grub.
Sigh, I've forgotten the exact procedure. I'm not sure why it's not mounting the Ubuntu partition unless you're accidentally trying to mount the swap partition instead. However, as Glenn said, doing fdisk should help us figure it out. (or cfdisk /dev/sda).
Then, once you figure out which partion the Ubuntu installation is on, you can reinstall its grub in its root partition and use that noverify thing.
Pardon me for being so vague, but I haven't done it for awhile, and don't want to give specifics that will steer you the wrong way.
bob
6th February 2009, 03:47 AM
Scott, is what you're after this?
title Ubuntu
configfile (hd0,0)/boot/grub/menu.lst
That's kind of the universal boot info for a linux distro that will pick up the first kernel on whatever linux distro might be on the first partition of the first drive. You'd adjust (hd0,0) to (hd0,1) for the second partition of the first drive and so forth. Naturally, (hd1,0) would then be the first partition of the second drive....etc.
Yes, it's well-known to we poor .rpm folks that RPM distros do a lousy job of finding other linux distros during installation, so we always make a backup of the existing grub menu.lst from other distros and then add it to our grub.conf (or menu.lst). Alternatively, we can simply go into advanced bootloader options during the install and put Fedora's grub on it's root partition and then use the existing bootloader by adding Fedora to it (my favorite method).
anlgalways
6th February 2009, 04:23 AM
If you can post the output of the commands /sbin/fdisk -l and cat /boot/grub/menu.lst it would be very helpful. Use sudo or a root log in.
Edit: I'll be away from the computer for a while so I may not respond right away. Others can pick up from here though.
The output of /sbin/fdisk -l was:
[root@localhost ~]# /sbin/fdisk -l
\
Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xf9c6e599
Device Boot Start End Blocks Id System
/dev/sda1 * 1 5100 40960000 83 Linux
/dev/sda2 19088 19457 2972025 5 Extended
/dev/sda3 5101 5125 200812+ 83 Linux
/dev/sda4 5126 19087 112149765 8e Linux LVM
/dev/sda5 19088 19457 2971993+ 82 Linux swap / Solaris
Partition table entries are not in disk order
And of cat /boot/grub/menu.lst :
[root@localhost ~]# cat /boot/grub/menu.lst
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,2)
# kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
# initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=0
splashimage=(hd0,2)/grub/splash.xpm.gz
hiddenmenu
title Fedora (2.6.27.12-170.2.5.fc10.i686)
root (hd0,2)
kernel /vmlinuz-2.6.27.12-170.2.5.fc10.i686 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.27.12-170.2.5.fc10.i686.img
title Fedora (2.6.27.5-117.fc10.i686)
root (hd0,2)
kernel /vmlinuz-2.6.27.5-117.fc10.i686 ro root=UUID=5eb506f9-2ded-4604-9bfb-be13263c9c66 rhgb quiet
initrd /initrd-2.6.27.5-117.fc10.i686.img
Thanks so much.
scottro
6th February 2009, 04:49 AM
@Bob, not exactly. It would be more like, (I'm guessing that Ubuntu is on sda1 since Fedora does LVM by default)
title Ubuntu
rootnoverify (hd0,0)
chainloader +1
That wil work IF Ubuntu's grub is in Ubuntu's root partition.
It's not hard to do, but I've forgotten the syntax, I think it can actually be done from Fedora using chroot.
AH--if you installed Ubuntu and used ext4, then, you might have a problem loading it from Fedora if you didn't choose to add ext4 support. In either case, I think the easiest way would be to boot from the Ubuntu CD, choose rescue and reinstall grub. Here's where my memory is hazy in the syntax for putting it in Ubuntu's root partition rather than the MBR. Or--reinstall it, put it in the MBR and use it to boot Fedora, which it should be able to do.
anlgalways
6th February 2009, 05:23 AM
@Bob, not exactly. It would be more like, (I'm guessing that Ubuntu is on sda1 since Fedora does LVM by default)
title Ubuntu
rootnoverify (hd0,0)
chainloader +1
That wil work IF Ubuntu's grub is in Ubuntu's root partition.
It's not hard to do, but I've forgotten the syntax, I think it can actually be done from Fedora using chroot.
AH--if you installed Ubuntu and used ext4, then, you might have a problem loading it from Fedora if you didn't choose to add ext4 support. In either case, I think the easiest way would be to boot from the Ubuntu CD, choose rescue and reinstall grub. Here's where my memory is hazy in the syntax for putting it in Ubuntu's root partition rather than the MBR. Or--reinstall it, put it in the MBR and use it to boot Fedora, which it should be able to do.
Yes, Ubuntu is indeed sda1. I believe that it is formatted in ext3. I am not sure what that means but I guess that is the formatting, right? Would it have changed the formatting while installing Fedora?
There is no rescue or repair utility on my Ubuntu CD. I am going to look for an image that does have a repair utility but I am not too hopeful about that. What I was able to do with the live CD was load Ubuntu (not off the hard drive but off of the CD) and then get a look at the partitioning. This told me that sda1 is Ubuntu (~40GB) and that it is ext3 formatted. It was unable to mount the partition also and returned the same error message that I have listed in my first post. As I am a bit of a newbie I do not know how to edit the grub configuration file. Is there a rescue and repair utility for grub that can be used within either fedora or Ubuntu from the live CD?
If it makes it any easier, I would be quite happy to just be about to mount the Ubuntu partition and recover my files. After that I can wipe the drive and start from scratch. I guess I was quite stupid not to back up my files!
Thanks so much!
glennzo
6th February 2009, 09:00 AM
You should be able to mount the Ubuntu partition with these commands
sudo mkdir /media/ubuntu
mount -t ext3 /dev/sda1 /media/ubuntu
If that's successful then you can grab the boot stanza from Ubuntu's /boot/grub/menu.lst and add it to Fedora's /boot/grub/menu.lst. Next time you reboot you will see Ubuntu as a boot option.
Bob's suggestion of
title Ubuntu
configfile (hd0,0)/boot/grub/menu.lst
usually works wonders in a situation like this also.
I play a bit with Ubuntu so I have some notes that seem specific to that particular distro. One of the things I noted was the procedure for re-installing the Ubuntu boot loader. Here's a link to the page where I keep those notes, http://johnson.homelinux.net/mywiki/Reinstall_The_Bootloader
anlgalways
7th February 2009, 08:59 PM
You should be able to mount the Ubuntu partition with these commands
sudo mkdir /media/ubuntu
mount -t ext3 /dev/sda1 /media/ubuntu
If that's successful then you can grab the boot stanza from Ubuntu's /boot/grub/menu.lst and add it to Fedora's /boot/grub/menu.lst. Next time you reboot you will see Ubuntu as a boot option.
Unfortionatly when I try to mount sda1 in the terminal it gives the same error:
[root@localhost ubuntu]# mount -t ext3 /dev/sda1 /media/ubuntu
mount: wrong fs type, bad option, bad superblock on /dev/sda1,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
I figured that trying another file system was worth a try even though I am quite sure that it is ext3.
Trying ext4 returned the same error however trying ext2 kind of worked:
[root@localhost ubuntu]# mount -t ext2 /dev/sda1 /media/ubuntu
[root@localhost ubuntu]# cd /media/ubuntu
[root@localhost ubuntu]# ls
ls: cannot access var: Input/output error
ls: cannot access etc: Input/output error
ls: cannot access bin: Input/output error
ls: cannot access boot: Input/output error
ls: cannot access dev: Input/output error
ls: cannot access home: Input/output error
ls: cannot access mnt: Input/output error
ls: cannot access opt: Input/output error
ls: cannot access proc: Input/output error
ls: cannot access root: Input/output error
ls: cannot access sbin: Input/output error
ls: cannot access srv: Input/output error
ls: cannot access tmp: Input/output error
ls: cannot access usr: Input/output error
bin dev initrd.img lost+found opt sbin tmp vmlinuz
boot etc initrd.img.old media proc srv usr vmlinuz.old
cdrom home lib mnt
I cannot access the boot directory as it says Input/Output error.
My guess is that the reason it won't mount as ext3 is not because of the file system but because of some other problem. Clearly all the directories are there which seems to be a good sign though.
I tried the other suggestion:
title Ubuntu
configfile (hd0,0)/boot/grub/menu.lst
returns:
[root@localhost ubuntu]# title Ubuntu
-bash: title: command not found
I'm probably making a mistake with the syntax though.
Trying the next line anyway returns:
[root@localhost ubuntu]# configfile (hd0,0)/boot/grub/menu.lst
-bash: syntax error near unexpected token `hd0,0'
As I am not quite sure what these do I do not know how to correct my mistake.
glennzo
7th February 2009, 09:13 PM
Unfortionatly when I try to mount sda1 in the terminal it gives the same error:
[root@localhost ubuntu]# mount -t ext3 /dev/sda1 /media/ubuntu
mount: wrong fs type, bad option, bad superblock on /dev/sda1,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
I figured that trying another file system was worth a try even though I am quite sure that it is ext3.
Trying ext4 returned the same error however trying ext2 kind of worked:
[root@localhost ubuntu]# mount -t ext2 /dev/sda1 /media/ubuntu
[root@localhost ubuntu]# cd /media/ubuntu
[root@localhost ubuntu]# ls
ls: cannot access var: Input/output error
ls: cannot access etc: Input/output error
ls: cannot access bin: Input/output error
ls: cannot access boot: Input/output error
ls: cannot access dev: Input/output error
ls: cannot access home: Input/output error
ls: cannot access mnt: Input/output error
ls: cannot access opt: Input/output error
ls: cannot access proc: Input/output error
ls: cannot access root: Input/output error
ls: cannot access sbin: Input/output error
ls: cannot access srv: Input/output error
ls: cannot access tmp: Input/output error
ls: cannot access usr: Input/output error
bin dev initrd.img lost+found opt sbin tmp vmlinuz
boot etc initrd.img.old media proc srv usr vmlinuz.old
cdrom home lib mnt
I cannot access the boot directory as it says Input/Output error.
My guess is that the reason it won't mount as ext3 is not because of the file system but because of some other problem. Clearly all the directories are there which seems to be a good sign though.
I tried the other suggestion:
title Ubuntu
configfile (hd0,0)/boot/grub/menu.lst
returns:
[root@localhost ubuntu]# title Ubuntu
-bash: title: command not found
I'm probably making a mistake with the syntax though.
Trying the next line anyway returns:
[root@localhost ubuntu]# configfile (hd0,0)/boot/grub/menu.lst
-bash: syntax error near unexpected token `hd0,0'
As I am not quite sure what these do I do not know how to correct my mistake.
You need to add those lines, the ones suggested by Bob, to the file /boot/grub/menu.lst.
su -
gedit /boot/grub/menu.lst
Add Bob's lines to the bottom of the file, save and exit. Reboot and try Ubuntu.
anlgalways
7th February 2009, 10:50 PM
Thanks for the speedy reply. I posted Bob's lines in /boot/grub/menu.lst but when rebooting, it gave this error:
Error 24: Attempt to access block outside partition
Press any key to continue
Pressing a key brings me to a menu that gives me the choice of booting into Ubuntu or Fedora. Choosing Ubuntu yields the same Error 24 message again. Choosing Fedora boots Fedora normally.
From what I can tell, it can't access the /boot/grub/menu.lst on sda1 and that is why I am getting this error message. What has me confused is why it won't mount or access sda1 when clearly it hasn't been corrupted or erased. I'm guessing that the same thing that is causing the inability to mount sda1 is causing this error message because it can't access /boot/grub/menu.lst on sda1 and therefore can't configure the booting from the file. So the real mystery is why it won't mount of boot from sda1.
I really appreciate everyone's persistence in helping me with this. Even though we have not made progress yet I am learning a ton both from the your advice and from reading about the problem.
glennzo
7th February 2009, 10:53 PM
I'm beginning to think that there is some sort of error with the hard disk layout or partitions. fdisk shows the partition as EXT3 but is it really EXT3? If it was, you should have no problem mounting and accessing the partition.
anlgalways
8th February 2009, 04:53 AM
I'm beginning to think that there is some sort of error with the hard disk layout or partitions. fdisk shows the partition as EXT3 but is it really EXT3? If it was, you should have no problem mounting and accessing the partition.
Should I try mounting with different file systems in hopes that one will work or should I consider it a lost cause and just delete that partition?
Is there anything else I can try?
glennzo
8th February 2009, 11:17 AM
Off of the internet from a Google search.24 : Attempt to access block outside partition
This error is returned if a linear block address is outside of the disk partition. This generally happens because of a corrupt filesystem on the disk or a bug in the code handling it in GRUB (it's a great debugging tool).I'd hate to be the one to say chuck it all and start over but if there's no important data on the partition and you can't access it no matter what you do I guess there's no other option.
mount: wrong fs type, bad option, bad superblock on /dev/sda1,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
One of the reasons you would get this error is by trying to mount, for example, an NTFS partition using mount -t EXT3 /dev/sda1 /media/ubuntu.
bob
8th February 2009, 11:45 AM
This would be a good time to use your drive manufacturer's tools from their site and check to see if your drive is failing. Most drives have a 3-year warranty.
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.