Results 1 to 7 of 7
On my first day at work I used a Fedora Live CD to resize an existing Ubuntu partition but can no longer boot into it (Fedora works fine, though). After ...
- 06-23-2009 #1Just Joined!
- Join Date
- Jun 2009
- Posts
- 5
Dual boot Fedora Ubuntu
On my first day at work I used a Fedora Live CD to resize an existing Ubuntu partition but can no longer boot into it (Fedora works fine, though). After reading about Fedora's inability to recognize other GNU/Linux installations, I tried to find the necessary information to enter into grub, but I can't even mount the partition anymore!
Incidentally, neither can grub: after trying to guess at a few paths based on the other machines in the office, grub just spits out a "can't mount the volume" error. Trying to enter "rootnoverify" and "chainloader +1" yielded a "bad executable" error. Why can't anything use this partition anymore? I'm tempted to just hunt down an Ubuntu Live CD and try using that to recover the partition, but I have no idea what that would do to Fedora's grub configuration.
Here's "fdisk -lu":
As far as I can tell, sda1 is the Ubuntu partition, sda3 is Fedora's /boot partition, sda4 is the rest of Fedora and sda5 is the swap partition (I don't know if Fedora or Ubuntu put that there). I'm also not sure what sda2 is. It's not critical that I recover the partition, but it'd be nice. Any ideas?Code:Disk /dev/sda: 250.0 GB, 250000000000 bytes 255 heads, 63 sectors/track, 30394 cylinders, total 488281250 sectors Units = sectors of 1 * 512 = 512 bytes Disk identifier: 0xa42d04a3 Device Boot Start End Blocks Id System /dev/sda1 * 63 204800062 102400000 83 Linux /dev/sda2 476343315 488279609 5968147+ 5 Extended /dev/sda3 204812685 205214309 200812+ 83 Linux /dev/sda4 205214310 476343314 135564502+ 8e Linux LVM /dev/sda5 476343378 488279609 5968116 82 Linux swap / Solaris Partition table entries are not in disk order
- 06-23-2009 #2Linux Guru
- Join Date
- Oct 2007
- Location
- Tucson AZ
- Posts
- 1,942
Boot into Fedora and create a mount point for Ubuntu as root.
mkdir /mnt/ubuntu
As root, mount ubuntu: mount -t ext3 /dev/sda1 /mnt/ubuntu
(this is assuming ext3 filesystem and ubuntu on sda1?)
List directories for Ubuntu: ls -l /mnt/ubuntu/
You should see the files there. If you do, then navigate to the /boot/grub/menu.lst file to get the Ubuntu entry and copy to the Fedora menu.lst file (done as root).
- 06-23-2009 #3Just Joined!
- Join Date
- Jun 2009
- Posts
- 5
That's where I ran into trouble before... trying to mount sda1 yields:
Here's the dmesg | tail output:Code: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 can't make much sense of it, but I suspect the "want" being greater than the "limit" is a serious problem.Code:JBD: IO error reading journal superblock EXT3-fs: error loading journal. attempt to access beyond end of device sda1: rw=0, want=237768728, limit=204800000 JBD: IO error reading journal superblock EXT3-fs: error loading journal. attempt to access beyond end of device sda1: rw=0, want=237768728, limit=204800000 JBD: IO error reading journal superblock EXT3-fs: error loading journal.
- 06-23-2009 #4
I've never used it, but I believe Super Grub Disk will allow you to fix this fairly easily.
Super Grub Disk Homepage
Super GRUB Disk--A GRUB Repair Utility
- 06-23-2009 #5Just Joined!
- Join Date
- Jun 2009
- Posts
- 5
I'll give it a shot tomorrow after I bring in a USB drive, but I suspect grub's not the real problem since I can't even mount the partition. Unless Super Grub Disk can fix other things in the master boot record besides grub... isn't that where partition information is stored?
- 06-24-2009 #6Linux Guru
- Join Date
- Oct 2007
- Location
- Tucson AZ
- Posts
- 1,942
The error you get "wrong fs type, bad option, bad superblock on /dev/sda1" may be the wrong filesystem. I assumed ext3 as the filesystem but don't know if that is correct?? Check to see whether ext3 is the correct filesystem for your version of Ubuntu?
In you first post you stated you did not know what sda2 is, it's an Extended Partition which is a placeholder for your logical partitions and can hold no data.
I agree the above could be part of the problem. Your fdisk -l output in your first post hows the "204800000" for sda1. Not sure what that means as I've never used LVM and don't know if that has anything to do with it.attempt to access beyond end of device
sda1: rw=0, want=237768728, limit=204800000
- 06-26-2009 #7Just Joined!
- Join Date
- Jun 2009
- Posts
- 5
Wow, Super Grub Disk is indeed super! Using it I was able to not only read the Ubuntu menu.lst file, but I was able to load the kernel. Unfortunately, things went downhill from there... as soon as it got to the "root=" argument, it was unable to load /sbin/init: "mount" claimed that the UUID it was trying to mount was an invalid argument. After this the kernel went to a console without mounting anything. But at least I had the paths I wanted!
Noting the kernel and initrd image, I edited Fedora's grub.conf with the Ubuntu information. Same problem (mount claims "invalid argument"), even replacing "root=" with "/dev/sda1" instead of whatever that UUID was. Also, while trying "/dev/hda1" grub asserted (correctly) that hda1 doesn't exist, so I think the UUID is still correct (Wikipedia says there's no reason they should change since they're stored in the partition).
So just to clarify, the Ubuntu kernel was able to load and then failed upon reaching "mount /dev/sda1 /root". Which means we're back to square one. What on earth happened to this volume?
fsck seemed the logical next step, since the partition is expendable. Unfortunately, I got all kinds of messes from that. Here's the code:
Since the physical size goes to 100 megs (the partition size I chose for the Ubuntu partition during the Fedora install) if I assume a block size of 4K (incidentally, it looks like the Fedora partition uses 1K block sizes judging from the fdisk output, confusing matters further), I'm going to side with the partition table on this one and assume the superblock is the culprit.Code:sudo e2fsck /dev/sda1 Superblock has an invalid journal (inode 8). Clear? yes *** ext3 journal has been deleted - filesystem is now ext2 only *** The filesystem size (according to the superblock) is 59542906 blocks The physical size of the device is 25600000 blocks Either the superblock or the partition table is likely to be corrupt! Abort? yes
Unfortunately, the backup superblock at "e2fsck -n -b 32768 /dev/sda1" was screwed too, but I didn't want to clear it in case there was something else we could do. Here's the results:
Looks to me like the Ubuntu filesystem wasn't informed about the partition resize. If I'm lucky, we can somehow reconfigure the superblocks. If I'm unlucky, my shiny new Fedora partition just steamrollered half the Ubuntu partition's data. Which would actually be kind of amusing... I knew Fedora didn't play nice with other distros, but geez... :P Any thoughts?Code:Superblock has an invalid journal (inode 8). Clear? no e2fsck: Illegal inode number while checking ext3 journal for /dev/sda1


Reply With Quote