[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Are BSD partitions not supported?
From: |
C. P. Ghost |
Subject: |
Are BSD partitions not supported? |
Date: |
Sun, 16 May 2010 18:24:31 +0200 |
Hello,
is support for BSD partitions (or maybe ufs2) broken in grub2 (1.98)?
On FreeBSD 8.0-STABLE #0 r207730 amd64:
=== 1. Creating a disk image:
phenom# dd if=/dev/zero of=disk.img bs=512 count=500000
500000+0 records in
500000+0 records out
256000000 bytes transferred in 3.318285 secs (77148286 bytes/sec)
=== 2. Turning it into a memory device /dev/md4444:
phenom# mdconfig -a -t vnode -f disk.img -u 4444
phenom# ls -l /dev/md*
crw-r----- 1 root operator 0, 152 May 16 17:40 /dev/md4444
crw------- 1 root wheel 0, 58 May 16 17:01 /dev/mdctl
=== 3. Setting a partition table on it:
phenom# sysctl kern.geom.debugflags=16
kern.geom.debugflags: 0 -> 16
phenom# fdisk -u /dev/md4444
(...)
Information from DOS bootblock is:
1: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
start 63, size 497952 (243 Meg), flag 80 (active)
beg: cyl 0/ head 1/ sector 1;
end: cyl 30/ head 254/ sector 63
2: <UNUSED>
3: <UNUSED>
4: <UNUSED>
Should we write new partition table? [n] y
fdisk: Class not found
phenom# ls -l /dev/md4444*
crw-r----- 1 root operator 0, 152 May 16 17:43 /dev/md4444
crw-r----- 1 root operator 0, 153 May 16 17:43 /dev/md4444s1
=== 4. Creating a disk label on it:
phenom# bsdlabel -w /dev/md4444s1
phenom# bsdlabel -e /dev/md4444s1
(...)
phenom# bsdlabel /dev/md4444s1
# /dev/md4444s1:
8 partitions:
# size offset fstype [fsize bsize bps/cpg]
a: 497936 16 unused 0 0
c: 497952 0 unused 0 0 # "raw" part, don't edit
phenom# ls -l /dev/md*
crw-r----- 1 root operator 0, 152 May 16 17:43 /dev/md4444
crw-r----- 1 root operator 0, 153 May 16 17:45 /dev/md4444s1
crw-r----- 1 root operator 0, 155 May 16 17:45 /dev/md4444s1a
crw------- 1 root wheel 0, 58 May 16 17:01 /dev/mdctl
=== 5. Creating a file system:
phenom# newfs /dev/md4444s1a
/dev/md4444s1a: 243.1MB (497936 sectors) block size 16384, fragment size 2048
using 4 cylinder groups of 60.80MB, 3891 blks, 7808 inodes.
super-block backups (for fsck -b #) at:
160, 124672, 249184, 373696
phenom# mount /dev/md4444s1a /mnt
=== 6. Installing grub on it:
phenom# grub-install --root-directory=/mnt /dev/md4444
/usr/local/sbin/grub-probe: error: no such partition.
Auto-detection of a filesystem module failed.
Please specify the module with the option `--modules' explicitly.
phenom# grub-install --root-directory=/mnt --modules=ufs2 /dev/md4444
/usr/local/sbin/grub-probe: error: no such partition.
/usr/local/sbin/grub-probe: error: no such partition.
/usr/local/sbin/grub-setup: error: no such partition.
Whatever happened here, the modules ARE now installed
in /mnt/boot/grub...
=== 7. Playing with grub-probe:
phenom# grub-probe --device /dev/md4444 --target=fs
grub-probe: error: unknown filesystem.
phenom# grub-probe --device /dev/md4444s1 --target=fs
grub-probe: error: unknown filesystem.
phenom# grub-probe --device /dev/md4444s1a --target=fs
grub-probe: error: no such partition.
phenom# grub-probe --device /dev/md4444s1a --target=drive
(/dev/md4444,1,a)
phenom# grub-probe --device /dev/md4444s1a --target=fs_uuid
grub-probe: error: no such partition.
phenom# grub-probe --device /dev/md4444s1 --target=fs_uuid
grub-probe: error: unknown filesystem.
phenom# grub-probe --device /dev/md4444s1 --target=partmap
part_msdos
phenom# grub-probe --device /dev/md4444s1a --target=partmap
grub-probe: error: no such partition.
=== 8. Umounting the disk image
phenom# umount /mnt
phenom# mdconfig -d -u 4444
phenom# sysctl kern.geom.debugflags=0
kern.geom.debugflags: 16 -> 0
phenom# chmod 666 disk.img
=== 9. Testing grub with qemu
% qemu -hda disk.img
Booting from Hard Disk
Missing operating system_
What am I missing here? BTW, if I repeat the steps above
with a different slice type (e.g. FAT<something>) and filesystem
type msdosfs, grub2 works as it should. So it must be something
with BSD slices/partitions or UFS/UFS2 support that appears
(or is?) broken.
Thanks,
-cpghost.
--
Cordula's Web. http://www.cordula.ws/
- Are BSD partitions not supported?,
C. P. Ghost <=
- Re: Are BSD partitions not supported?, C. P. Ghost, 2010/05/18
- Re: Are BSD partitions not supported?, Vladimir 'φ-coder/phcoder' Serbinenko, 2010/05/18
- Re: Are BSD partitions not supported?, C. P. Ghost, 2010/05/18
- Re: Are BSD partitions not supported?, Vladimir 'φ-coder/phcoder' Serbinenko, 2010/05/18
- Re: Are BSD partitions not supported?, C. P. Ghost, 2010/05/18
- Re: Are BSD partitions not supported?, C. P. Ghost, 2010/05/19
- Re: Are BSD partitions not supported?, Vladimir 'φ-coder/phcoder' Serbinenko, 2010/05/19
- Re: Are BSD partitions not supported?, C. P. Ghost, 2010/05/19
- Re: Are BSD partitions not supported?, C. P. Ghost, 2010/05/19
- Re: Are BSD partitions not supported?, Vladimir 'φ-coder/phcoder' Serbinenko, 2010/05/19