You are not logged in.

#1 2009-05-11 09:26:19

arvixx
Member
Registered: 2009-05-11
Posts: 8

[SOLVED] Problems with GRUB/MBR, running Ubuntu / Windows & Arch

I recently tried installing Arch on my work computer, after
running it on my laptop for a month or so. I already had a dual
boot setup with ubuntu and windows, that I didn't want to mess
up, since I might grow tired of Arch.

I have one disk for ubuntu, and another for windows. I recently
bough a new terabyte disk, and I wanted to use half of it for
Arch. I already put one ext2 partition on whole of that disk, so
I resized that partition, and moved it to the end of the disk (I
don't know why I did that, I think I read that linux needs to be
in the beginning of the disk or something big_smile).

So in the Arch installer, I partition this disk using a scheme
described in the Guide.

/     75 gig 
/var  10 gig
/swap 4 gig 
/home rest

I didn't know whether to set / to bootable or not, but i decided
not to, since the guide didn't say anything about it.

The result can be seen in the fdisk output further down.

I choose not to install the bootloader, since I thought I could
use Ubuntus grub to boot Arch. However, it does not seem to
work. Whenever I try to boot Arch, GRUB says "Error 2". I tried
using cfdisk to set the partition with arch / to bootable, but still I
get the same error.

I just don't know whats wrong. I've confirmed using the grub
command line, and the geometry command, that (hd2,1) should be
the correct root. If I mount that partition in Ubuntu, I can
confirm that vmlinuz26 and kernel26.img are in the right
places. It still does not work.

menu.lst:

title           Arch Linux (Main)
root            (hd2,1)
kernel          /boot/vmlinuz26 root=/dev/disk/by-uuid/374c1b80-a228-46ed-b871-4677af8ba5f6 ro vga=773
initrd          /boot/kernel26.img

# This is a divider, added to separate the menu items below from the Debian
# ones.
title        Ubuntu:
root

title        Ubuntu 8.10, kernel 2.6.27-11-generic
root        (hd1,1)
kernel        /boot/vmlinuz-2.6.27-11-generic root=UUID=b2e2c0a1-e45f-4824-a168-e4fc9447d7fa ro quiet splash 
initrd        /boot/initrd.img-2.6.27-11-generic
quiet

title        Ubuntu 8.10, kernel 2.6.27-11-generic (recovery mode)
root        (hd1,1)
kernel        /boot/vmlinuz-2.6.27-11-generic root=UUID=b2e2c0a1-e45f-4824-a168-e4fc9447d7fa ro  single
initrd        /boot/initrd.img-2.6.27-11-generic

### END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian
# ones.
title        Windows:
root


# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/hda1
title        Microsoft Windows XP Professional
root        (hd0,0)
savedefault
makeactive
chainloader    +1

blkid output:

/dev/sda1: LABEL="godisdata" UUID="09883ede-eda5-43f6-93ce-7256b375a63b" TYPE="ext2" 
/dev/sdb1: UUID="86502C5A502C52EB" TYPE="ntfs" 
/dev/sdc1: UUID="6C08045A080425A4" TYPE="ntfs" 
/dev/sdc2: UUID="b2e2c0a1-e45f-4824-a168-e4fc9447d7fa" TYPE="ext3" 
/dev/sdc5: TYPE="swap" UUID="2730875c-ddcd-43cc-8f99-7183247584a4" 
/dev/sda2: UUID="374c1b80-a228-46ed-b871-4677af8ba5f6" SEC_TYPE="ext2" TYPE="ext3" 
/dev/sda3: UUID="385a011d-937e-4661-8dd4-5e23c8406225" SEC_TYPE="ext2" TYPE="ext3" 
/dev/sda5: TYPE="swap" UUID="94d1426e-f84e-493b-93e7-5634c7a1404c" 
/dev/sda6: UUID="9aee8a77-a0cd-4297-87b2-9f2c09670d4a" SEC_TYPE="ext2" TYPE="ext3" 
/dev/sdd1: UUID="e1ceb6f1-34a1-479e-9fe4-4c93c7b06bd6" TYPE="ext2"

device.map

(hd0)    /dev/hda
(hd1)    /dev/hdb

fdisk output:

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0004b485

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1           57861      121601   511999582+  83  Linux            # media files
/dev/sda2   *           1        9118    73240303+  83  Linux            # arch / 
/dev/sda3            9119       10334     9767520   83  Linux            # arch /var 
/dev/sda4           10335       57860   381752595    5  Extended
/dev/sda5           10335       10820     3903763+  82  Linux swap / Solaris    # arch /swap
/dev/sda6           10821       57860   377848768+  83  Linux            #arch /home

Partition table entries are not in disk order

Disk /dev/sdb: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xffffffff

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1       24320   195350368+   7  HPFS/NTFS #windows

Disk /dev/sdc: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xde4326b0

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1       15201   122102001    7  HPFS/NTFS        # moremedia files
/dev/sdc2   *       15202       29778   117089752+  83  Linux            # ubuntu /
/dev/sdc3           29779       30401     5004247+   5  Extended
/dev/sdc5           29779       30401     5004216   82  Linux swap / Solaris    #ubuntu /swap

Disk /dev/sdd: 4063 MB, 4063232000 bytes
10 heads, 45 sectors/track, 17635 cylinders
Units = cylinders of 450 * 512 = 230400 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1   *           1         716      160924+  83  Linux  #memory stick :)

This is kind of driving me mad, and I would appreciate all the help I can get smile

Last edited by arvixx (2009-05-12 06:56:25)

Offline

#2 2009-05-11 10:22:09

arvixx
Member
Registered: 2009-05-11
Posts: 8

Re: [SOLVED] Problems with GRUB/MBR, running Ubuntu / Windows & Arch

I realize now that the GRUB from Ubuntu may be really old. I don't even remember when i installed GRUB the first time. I think i have version 0.97, if I run "grub --version" in ubuntu, that is what i get. Could it be different from the one that's actually installed in the MBR?

Offline

#3 2009-05-11 10:29:42

arvixx
Member
Registered: 2009-05-11
Posts: 8

Re: [SOLVED] Problems with GRUB/MBR, running Ubuntu / Windows & Arch

Looks like this has something to do with inode size. According to linuxplanet , GRUB 0.97 has a problem with ext3 filesystems with 256 large inodes. I've got no idea how large my inodes are. I followed this guide.

# ubuntu disk
arvid@arvid-desktop:~$ sudo tune2fs -l /dev/sdc2  | grep Inode
Inode count:              14647296
Inodes per group:         16384
Inode blocks per group:   512
Inode size:              12

# arch disk
arvid@arvid-desktop:~$ sudo tune2fs -l /dev/sda2  | grep Inode
Inode count:              4579328
Inodes per group:         8192
Inode blocks per group:   512
Inode size:              256

Looks like i found the problem. Now I just have to find a fix wink

Offline

#4 2009-05-11 10:43:52

arvixx
Member
Registered: 2009-05-11
Posts: 8

Re: [SOLVED] Problems with GRUB/MBR, running Ubuntu / Windows & Arch

Don't think thats it anymore. Inode size was only relevant for the disk holding the actual grub-installation, not the one holding the OS I want to boot. Found some other strange things though: If i start up the grub shell in ubuntu, the layout of the disks are different. My arch-installation, which in the "boot-grub" is hd2, is hd0 in Ubuntu. Also, from the grub-shell in ubuntu, i can view files inside the arch-partition, which I can't from the "boot-grub-shell". I have no idea why this is.

from inside ubuntu:

grub> geometry (hd2)
drive 0x82: C/H/S = 30401/255/63, The number of sectors = 488397168, /dev/sdc
   Partition num: 0,  Filesystem type unknown, partition type 0x7
   Partition num: 1,  Filesystem type is ext2fs, partition type 0x83
   Partition num: 4,  Filesystem type unknown, partition type 0x82

grub> geometry (hd0)
drive 0x80: C/H/S = 121601/255/63, The number of sectors = 1953525168, /dev/sda
   Partition num: 0,  Filesystem type is ext2fs, partition type 0x83
   Partition num: 1,  Filesystem type is ext2fs, partition type 0x83
   Partition num: 2,  Filesystem type is ext2fs, partition type 0x83
   Partition num: 4,  Filesystem type unknown, partition type 0x82
   Partition num: 5,  Filesystem type is ext2fs, partition type 0x83

This would be totally different inside the grub shell. The weird mapping seems to be:

GRUB at Boot Inside Ubuntu    Explanation
hd0               hd1                  Ubuntu disk
hd1               hd2                  Windows?
hd2               hd0                  Arch linux

Offline

#5 2009-05-11 11:33:25

arvixx
Member
Registered: 2009-05-11
Posts: 8

Re: [SOLVED] Problems with GRUB/MBR, running Ubuntu / Windows & Arch

Okay, seems like I solved it. It was definitely something with filesystems. I booted up the arch installer, reformated / using ext3 with an inode size of 128. This was kind of tricky, since the arch installer gladly created file systems for me, but there was no way of saying how large the inodes should be. So I had to drop out in to the shell and do it by my self using

mkfs.ext3 -I 128 /dev/sda2

Then, when the arch installer asks me whether i want to create a file system on /dev/sda2, i choose not to, since I've already made one.

Offline

#6 2009-05-11 12:02:13

schuay
Package Maintainer (PM)
From: Austria
Registered: 2008-08-19
Posts: 564

Re: [SOLVED] Problems with GRUB/MBR, running Ubuntu / Windows & Arch

arvixx wrote:
/     75 gig 
/var  10 gig
/swap 4 gig 
/home rest

Offtopic: What on earth are you doing on / that you need 85 gigs for big_smile
My partition setup is more like

/ 8G
/boot 128M
/home Rest

And I've never run into any limits. Never needed a swap partition with 2G RAM. Just curious ..

Offline

#7 2009-05-11 12:55:40

arvixx
Member
Registered: 2009-05-11
Posts: 8

Re: [SOLVED] Problems with GRUB/MBR, running Ubuntu / Windows & Arch

Hah, no idea! I just don't have a clue about whats reasonable smile For swap i choose my ram x 2, thought that would be enough. Yeah, doing some checking on my old ubuntu system. Used about 8-10 gigs for /. Guess I'll have to trim that partition when i run out of space smile

Offline

Board footer

Powered by FluxBB