You are not logged in.

#1 2011-09-24 10:30:55

ninjaaron
Member
Registered: 2010-12-10
Posts: 296

[Solved]Ubuntu took over my bootloader!

[edit]  This thread has changed a lot in the course of it's short life.  The current problem begins in post five.

===============================
Ok, Ubuntu hasn't taken over my bootloader yet, but I'm installing it right now to create some deb packages, and it's going to install a new bootloader.

I want Arch to control the bootloader.  I tried running grub-install in Arch before, but it said the command wasn't found.

So, how do I get the Arch bootloader back?

Last edited by ninjaaron (2011-09-24 15:00:18)

Offline

#2 2011-09-24 10:37:46

ninjaaron
Member
Registered: 2010-12-10
Posts: 296

Re: [Solved]Ubuntu took over my bootloader!

Ok, Ubuntu has now officially taken over my bootloader.

I suppose I could just theoretically chainload into arch from Ubuntu, but I'd rather have arch as the default and Ubuntu chain loaded just for when I need to work on debs.

Maybe I should have done this all with a VM.  Ah well, it's done now.

Offline

#3 2011-09-24 11:36:24

ninjaaron
Member
Registered: 2010-12-10
Posts: 296

Re: [Solved]Ubuntu took over my bootloader!

Alright, grub-install worked this time.  Maybe I was doing it wrong before or something.  Now I can't make ubuntu boot.  I'm not exaclty sure what to put in the menu.lst

It's on sda6, which, obviously, is a logical partition.  I tried setting root as hd0,7, (and 6, and 2, which is the actual partition number), but it didn't work.

checking wiki now...

Offline

#4 2011-09-24 11:46:39

ninjaaron
Member
Registered: 2010-12-10
Posts: 296

Re: [Solved]Ubuntu took over my bootloader!

Ok, it didn't have any special instructions about logical partition numbering.  Yet, when I try to boot, it tells me that hd0,7 (should be sda6, right?) doesn't exist.  I'm quite sure it does, as I was messing around with it a few minutes ago, and I can mount it and browse it now.

Offline

#5 2011-09-24 12:21:21

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,600
Website

Re: [Solved]Ubuntu took over my bootloader!

...is there a point to this thread or a question therein?


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#6 2011-09-24 12:27:56

ninjaaron
Member
Registered: 2010-12-10
Posts: 296

Re: [Solved]Ubuntu took over my bootloader!

There was.  There still is, but it's a different point now.


How do I get Grub load Ubuntu form /dev/sda7 when it claims that the device doesn't exist?

[edit]
should be /dev/sda6

Last edited by ninjaaron (2011-09-24 13:36:59)

Offline

#7 2011-09-24 12:36:50

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,600
Website

Re: [Solved]Ubuntu took over my bootloader!

Post the output of fdisk -l /dev/sda and also your active /boot/grub/menu.lst

Last edited by graysky (2011-09-24 13:42:17)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#8 2011-09-24 12:59:52

ninjaaron
Member
Registered: 2010-12-10
Posts: 296

Re: [Solved]Ubuntu took over my bootloader!

Result of fdisk -l /dev/sda6  (it was sda6.  I was just thinking of hd0,7)

Cannot open /dev/sda6

Seems weird, since I can mount it.

anyway, /boot/grub/menu.lst (with most comments removed)

# general configuration:
timeout   2
default   0
color light-blue/black light-cyan/blue

# boot sections follow

# (0) Arch Linux
title  Arch Linux - vmlinuz-linux
root   (hd0,0)
kernel /vmlinuz-linux root=/dev/sda4 ro
initrd /initramfs-linux.img

# (1) Arch Linux
title  Arch Linux Fallback - vmlinuz-linux
root   (hd0,0)
kernel /vmlinuz-linux root=/dev/sda4 ro
initrd /initramfs-linux-fallback.img

# (2) Ubuntu 11.10
title Ubuntu 11.10
root (hd0,7)
kernel /vmlinux-linux root=/dev/sda6
initrd /boot/grub/core.img

[edit] I just checked, and fdisk can't read any of my partitions.

Last edited by ninjaaron (2011-09-24 13:37:45)

Offline

#9 2011-09-24 13:42:44

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,600
Website

Re: [Solved]Ubuntu took over my bootloader!

If fdisk can't read your partitions I'm guess you're using a gtp partition scheme.  Use gdisk in that case:

gdisk -l /dev/sda

EDIT: wait a sec... don't include the partition # with fdisk... for example:

fdisk -l /dev/sda

Last edited by graysky (2011-09-24 13:44:55)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#10 2011-09-24 13:59:38

ninjaaron
Member
Registered: 2010-12-10
Posts: 296

Re: [Solved]Ubuntu took over my bootloader!

from sudo fdisk -l /dev/sda

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0002d27f

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63       64259       32098+  83  Linux
/dev/sda2       603408382   625141759    10866689    5  Extended
/dev/sda3        19531776   603406335   291937280   83  Linux
/dev/sda4           64260    19531775     9733758   83  Linux
/dev/sda5       618993664   625141759     3074048   82  Linux swap / Solaris
/dev/sda6       603408384   618991615     7791616   83  Linux

Just to clarify,  I didn't wipe the disk when I installed arch. I kept my home folder and swap partitions from a previous distro, so now sda1 is /boot, sda2 is extened (containing sda5, which is swap, and sda6, which is Ubuntu's /), sda3 is /home of Arch, and sda4 is / of Arch.  sda4 is physically before sda3.  Both of them are before 2.

It's kinda weird, but it works ok.  Except right now.

Last edited by ninjaaron (2011-09-24 14:28:35)

Offline

#11 2011-09-24 14:40:55

ninjaaron
Member
Registered: 2010-12-10
Posts: 296

Re: [Solved]Ubuntu took over my bootloader!

Oh crap.  I think I was supposed to have been using...

root hd0,5

... the number should go down instead of up.

checking now...

Offline

#12 2011-09-24 14:59:27

ninjaaron
Member
Registered: 2010-12-10
Posts: 296

Re: [Solved]Ubuntu took over my bootloader!

Well, it found the device, so that part was right, but then it didn't find the file.

So, I opened the /boot/grub/grub.cfg file in Ubuntu, and copied a bunch of stuff from it, and it works now.

The Ubuntu entry in my /boot/grub/menu.lst now looks like this:

title Ubuntu 11.10
root (hd0,5)
kernel /boot/vmlinuz-3.0.0-11-generic root=/dev/sda6 ro quite splash vt.handoff=7
initrd /boot/initrd.img-3.0.0-11-generic

Last edited by ninjaaron (2011-09-24 15:01:05)

Offline

Board footer

Powered by FluxBB