You are not logged in.

#1 2010-10-26 09:31:24

brutalregistry
Member
Registered: 2010-10-21
Posts: 13

FakeRaid0 Dual Boot GRUB Error 22

TL;DR: grub => setup (hd0) => running "install /grub/stage1 (hd0) (hd0)1+16 p (hd0,0)/grub/stage2 /grub/menu.lst" fails with error 22; no such partition.

I've been trying to install ArchLinux and Windows 7 on my FakeRaid0 setup for about 16 hours now.

I have followed http://wiki.archlinux.org/index.php/Ins … _Fake_RAID. It failed me a few times, so I've done a few things different this time and I am getting closer.

This time around I used GParted to delete all existing partitions, rewrite the partition table as msdos, and created the following partitions (values are in GB):

1: /boot        0.1     primary ext2
2: windows      100     primary ntfs
3: archlinux    38      extended
5: /            24      logical ext3
6: /var         10      logical ext3
7: /swap        4       logical linux-swap

I followed normal installation but skipped creating partitions. Also, when I was creating mountpoints, etc, I made sure to not rewrite the file system. I simply told the setup what file systems the partitions were, and what they map to. As per the Fake Raid wiki, I also made sure to install the dmraid package with installation and modify MODULES and HOOKS in mkinitcpio.conf.

I finished all the installation except 'Install Bootloader' step. At this point, I quit the setup and installed Windows 7 to /dev/mappers/isw_hcjajcgif_Primaryp2.

Once installed (I don't think it booted. I don't even know if I checked this time around; I've installed it at least 12 times today.), I booted up Arch Live again.

fdisk -l /dev/mappers/isw_hcjajcgif_Primary (my FakeRaid) output is interesting. When I first boot to live CD and initialize dm_mod and run dmraid -ay, fdisk tells me that my /boot partition (/dev/mappers/isw_hcjajcgif_Primaryp1) does not end on a cylinder boundary. After I mount the installation and chroot, fdisk doesn't report any problems. I guess I will also note that the boot flag is set on my NTFS partition.

Anyways, to get things going I did the following:

mount -t ext3 /dev/mapper/isw_hcjajcgif_Primaryp5 /mnt/arch
mount -t ext2 /dev/mapper/isw_hcjajcgif_Primaryp1 /mnt/arch/boot
mount -t ext3 /dev/mapper/isw_hcjajcgif_Primaryp6 /mnt/arch/var
mount -t proc proc /mnt/arch/proc
mount -t sysfs sys /mnt/arch/sys
mount -o bind /dev /mnt/arch/dev 
chroot /mnt/arch /bin/bash
rm -rf /boot/grub
cp /usr/lib/grub/i386-pc/* /boot/grub

/boot/grub/menu.lst did not exist, so I manually created it (vi /boot/grub/menu.lst) and wrote the following to it:

timeout 15
default 1
color light-blue/black light-cyan/blue

# (0) Arch Linux
title Arch Linux
root (hd0,0)
kernel /vmlinux26 root=/dev/mapper/isw_hcjajcgif_Primaryp5 ro vga=0x369
initrd /kernel26.img

# (1) Windows 7
title Windows 7
rootnoverify (hd0,1)
chainloader +1

While still chrooted, I ran the following as per the Fake Raid wiki:

dmsetup mknodes
grub --device-map=/dev/null
device (hd0) /dev/mapper/isw_hcjajcgif_Primary
geometry (hd0) 18079 255 63
root (hd0,0)
setup (hd0)
quit

The geometry line was needed otherwise any 'find' or 'root' command would fail with 'Floating Point Exception'. Yes, those numbers match the output from my fdisk -l. They are two 74 GB WD Raptors.

At setup (hd0), it doesn't find /boot/grub/stage1 (I guess because I have /boot as a separate partition). As such, it looks like it attempts to find /grub/stage1 and /grub/stage2, which both succeed. It also finds /grub/e2fs_stage1_5 and embeds 16 sectors to it.

Unfortunately, running "install /grub/stage1 (hd0) (hd0)1+16 p (hd0,0)/grub/stage2 /grub/menu.lst" fails with error 22; no such partition.

I can't figure this out at all. Any help is appreciated.

Last edited by brutalregistry (2010-10-26 19:59:16)

Offline

#2 2010-10-26 23:48:35

brutalregistry
Member
Registered: 2010-10-21
Posts: 13

Re: FakeRaid0 Dual Boot GRUB Error 22

I've spent all today trying again, from scratch each time. I finally at least have Windows booting by default, but I have the same problem when trying to write GRUB to the MBR.

This time around my partitions are as follows:

1: windows      100     primary ntfs
2: archlinux    38.5    extended
5: /boot        0.5     primary ext2
6: /            24      logical ext3
7: /var         10      logical ext3
8: /swap        4       logical linux-swap

Fortunately, cfdisk can actually open this. fdisk reports problems with not starting on physical sector boundary though, for all the extended/logical partitions.

From root, I run the following:

# mkdir /mnt/arch
# mount -t ext3 /dev/mapper/isw_hcjajcgif_Primaryp6 /mnt/arch
# mount -t ext2 /dev/mapper/isw_hcjajcgif_Primaryp5 /mnt/arch/boot
# mount -t ext3 /dev/mapper/isw_hcjajcgif_Primaryp7 /mnt/arch/var
# mount -t proc proc /mnt/arch/proc
# mount -t sysfs sys /mnt/arch/sys
# mount -o bind /dev /mnt/arch/dev 
# chroot /mnt/arch /bin/bash

# ln -s /dev/mapper/isw_hcjajcgif_Primaryp1 /dev/mapper/isw_hcjajcgif_Primary1
# ln -s /dev/mapper/isw_hcjajcgif_Primaryp5 /dev/mapper/isw_hcjajcgif_Primary5
# ln -s /dev/mapper/isw_hcjajcgif_Primaryp6 /dev/mapper/isw_hcjajcgif_Primary6
# ln -s /dev/mapper/isw_hcjajcgif_Primaryp7 /dev/mapper/isw_hcjajcgif_Primary7
# ln -s /dev/mapper/isw_hcjajcgif_Primaryp8 /dev/mapper/isw_hcjajcgif_Primary8

# dmsetup mknodes
# grub --device-map=/dev/null
grub> device (hd0) /dev/mapper/isw_hcjajcgif_Primary
grub> geometry (hd0) 18079 255 63
grub> root (hd0,4)
grub> setup (hd0)
grub> quit

The symlinks were suggested in the Fake Raid tutorial as well. I did them previously I just forgot to mention it.

I get the same error on setup (hd0) though. "Error 22: No such partition"

Pretty please help me.

Offline

Board footer

Powered by FluxBB