PDA

View Full Version : [ubuntu] v.910 & v.10.04 Dual Boot Problem



th1bill
February 8th, 2010, 02:11 PM
I knew I should have tested it inside VBox but I did a dual boot and went with the new Grub. At this time I can boot into Lucid with no problem but Karmic just stalls every time I try it before I get to the log in screen.

I have GParted on a Live Cd and if I can get back to booting Karmic I'll wipe the Lucid partition and put it inside VBox for further testing. I'm not brand new to ubuntu but I'm new enough to be lost on putting my Grub back into order.

Any help will be greatly appreciated.

darkod
February 8th, 2010, 02:27 PM
Depending how you installed both OSs, it might be real easy actually.
If you installed a bootloader (grub2) with both installs, both root partition should have the folder /boot/grub present with the grub2 config files.
But on the MBR of your hdd you would have grub2 from the most recent install (I assume Lucid) and it will use the grub files from Lucid root.
Switching to Krmic grub2 is as easy as booting with the Karmic cd in Try Ubuntu live desktop, and executing two commands in terminal.
Under ASSUMPTION you have only one hdd /dev/sda and your Krmic root is /dev/sda5, the commands would be (change them as necessary for your situation):

sudo mount /dev/sda5 /mnt
sudo grub-install --root-directory=/mnt/ /dev/sda

So, you first mount the Karmic partition and then reinstall grub2 on the MBR of /dev/sda. That grub2 will be connected to the partition you mounted (Karmic).

th1bill
February 8th, 2010, 02:59 PM
The data I got from the internet was much more complex and did not work,

Thank-you, I'll try this right away and post later.

th1bill
February 8th, 2010, 03:14 PM
Darkod,
I entered "sudo mount /dev/sda5 /mnt" and it returned "device ?ddd/dev/sda5 does not exist."

I believe I must have bone headed something in the partitioning. Is there any recovery from this?

darkod
February 8th, 2010, 03:18 PM
That was an example. Maybe your root partition is not /dev/sda5. If you are not sure, run:

sudo fdisk -l

and post the results here. It will show all partitions on your drive(s). But we still need to figure out which one will be 9.10 and which one 10.04.

th1bill
February 8th, 2010, 06:23 PM
Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical / optimal IO): 512 bytes / 512 bytes
Disk identifier: 0xfb82fb82

Device Boot Start End Blocks Id System
/dev/sda1 * 1 5876 47198938+ 83 Linux
/dev/sda2 5877 9729 30949222+ 5 Extended
/dev/sda5 9328 9729 3229033+ 82 Linux swap / Solaris
/dev/sda6 9182 9327 1172713+ 82 Linux swap / Solaris
/dev/sda7 5877 9038 25398702 83 Linux
/dev/sda8 9039 9181 1148616 82 Linux swap / Solaris

It looks to me like /dev/sda1 is it, that seems to be where the boot record is.

darkod
February 8th, 2010, 06:40 PM
Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical / optimal IO): 512 bytes / 512 bytes
Disk identifier: 0xfb82fb82

Device Boot Start End Blocks Id System
/dev/sda1 * 1 5876 47198938+ 83 Linux
/dev/sda2 5877 9729 30949222+ 5 Extended
/dev/sda5 9328 9729 3229033+ 82 Linux swap / Solaris
/dev/sda6 9182 9327 1172713+ 82 Linux swap / Solaris
/dev/sda7 5877 9038 25398702 83 Linux
/dev/sda8 9039 9181 1148616 82 Linux swap / Solaris

It looks to me like /dev/sda1 is it, that seems to be where the boot record is.

Well it's either /dev/sda1 or /dev/sda7 that you need to use in the first command. Don't you know according to the partition size? /dev/sda1 is approx 25GB (the root partition) and /dev/sda7 approx 13GB.
Does Karmic or Lucid have bigger root?
Or just use the commands first with /dev/sda1 and if that boots you into Lucid grub, then try again with /dev/sda7.

PS. If you installed Karmic first, usually /dev/sda1 would be Karmic. If Lucid was second it would be at the end, like /dev/sda7 is.

th1bill
February 8th, 2010, 07:25 PM
ubuntu@ubuntu:~$ sudo mount /dev/sda1 /mnt
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

ubuntu@ubuntu:~$ dmsg | tail
[ 256.933287] :Add Sense: No additional sense information
[ 257.926622] sd 4:0:0:2: ioctl_internal_command return code = 8000002
[ 257.926630] :Sense Key : No Sense [current]
[ 257.926637] :Add Sense: No additional sense information
[ 257.932830] sd 4:0:0:2: ioctl_internal_command return code = 8000002
[ 258.932838] :Sense Key : No Sense [current]
[ 258.932845] :Add Sense: No additional sense information
[ 259.926805} sd 4:0:0:2: ioctl_internal_command return code = 8000002
[ 259.926813] :Sense Key : No Sense [current]
[ 259.926820] :Add Sense: No additional sense information

As you can see I went ahead and tried the /dev/sda1 because the larger partition is Karmic and it returned the above results. I'm beginning to feel that I might need to bot Lucid and mount the 48 gig. file system and back up all my data and photos to a DVD and doa fresh install and rebuild the system... thoughts???

th1bill
February 8th, 2010, 07:34 PM
I can't do that, it refused to mount it for the same reason. I might have to brush up on my DR DOS to back my stuff up.

darkod
February 8th, 2010, 07:39 PM
That might be a good idea. I have no clue why it's giving you an error on /dev/sda1 and at the same time it might be the reason why Karmic stalls.
See if you can mount it from Lucid, back it up, and after you have a backup there is also one more thing to try if it can repair it. From the live desktop run:

sudo fsck /dev/sda1

That will check the filesystem. Similar to windows chkdsk.

darkod
February 8th, 2010, 07:39 PM
I can't do that, it refused to mount it for the same reason. I might have to brush up on my DR DOS to back my stuff up.

You could try the fsck command without a backup but it's better to have a backup as always. :)

th1bill
February 8th, 2010, 07:47 PM
It looks like tere is not much to loose so I'll run that next.