grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Are BSD partitions not supported?


From: C. P. Ghost
Subject: Re: Are BSD partitions not supported?
Date: Thu, 20 May 2010 18:19:52 +0200

On Wed, May 19, 2010 at 9:41 PM, C. P. Ghost <address@hidden> wrote:
> The next test would be to create two slices on an image,
> and redo the tests on the second slice (which won't start
> at offset 0 of the disk, so we can be sure the logic is
> correct). Will do this tomorrow with the patched grub,
> and report back.

Just a quick followup. I've had success with the patch on
a bigger multislice image too. The BSD slice is located
*after* a DOS slice for good measure:

phenom# fdisk /dev/md5555
******* Working on device /dev/md5555 *******
parameters extracted from in-core disklabel are:
cylinders=63 heads=255 sectors/track=63 (16065 blks/cyl)

parameters to be used for BIOS calculations are:
cylinders=63 heads=255 sectors/track=63 (16065 blks/cyl)

Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 6 (0x06),(Primary DOS, 16 bit FAT (>= 32MB))
    start 63, size 497952 (243 Meg), flag 0
        beg: cyl 0/ head 1/ sector 1;
        end: cyl 30/ head 254/ sector 63
The data for partition 2 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
    start 498078, size 497952 (243 Meg), flag 80 (active)
        beg: cyl 31/ head 1/ sector 1;
        end: cyl 61/ head 254/ sector 63
The data for partition 3 is:
<UNUSED>
The data for partition 4 is:
<UNUSED>

phenom# bsdlabel /dev/md5555s2
# /dev/md5555s2:
8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  a:   497936       16    4.2BSD        0     0     0
  c:   497952        0    unused        0     0         # "raw" part, don't edit

phenom# ls -l /dev/md5555*
crw-r-----  1 root  operator    0, 150 May 20 17:59 /dev/md5555
crw-r-----  1 root  operator    0, 153 May 20 17:57 /dev/md5555s1
crw-r-----  1 root  operator    0, 154 May 20 17:55 /dev/md5555s2
crw-r-----  1 root  operator    0, 156 May 20 17:56 /dev/md5555s2a

phenom# grub-install --root-directory=/mnt --modules=ufs2 /dev/md5555
/usr/local/sbin/grub-setup: warn: Your embedding area is unusually
small.  core.img won't fit in it..
/usr/local/sbin/grub-setup: warn: Embedding is not possible.  GRUB can
only be installed in this setup by using blocklists.  However,
blocklists are UNRELIABLE and their use is discouraged..
/usr/local/sbin/grub-setup: error: if you really want blocklists, use --force.

(----> No idea what's going on here... using --force. <----)

phenom# grub-install --force --root-directory=/mnt --modules=ufs2 /dev/md5555
/usr/local/sbin/grub-setup: warn: Your embedding area is unusually
small.  core.img won't fit in it..
/usr/local/sbin/grub-setup: warn: Embedding is not possible.  GRUB can
only be installed in this setup by using blocklists.  However,
blocklists are UNRELIABLE and their use is discouraged..
Installation finished. No error reported.

Now, testing the image:

% qemu -hda bsddisk.img
grub> root (hd0,<TAB>
Possible partitions are:

  Partition hd0,msdos1: Filesystem type fat, UUID 44b3-1913
  Partition hd0,msdos2: Unknown filesystem
  Partition hd0,msdos2,bsd1: Filesystem type ufs2 - Last modification
     time 2010-05-20 15:59:46 Thursday, UUID 4bf55bb9a21a9565

grub> root (hd0,msdos1)
(hd0,msdos1): Filesystem is fat.
grub> ls /
readme
grub> cat /README
This file is on a FAT16 filesystem.

grub> root (hd0,msdos2,bsd1)
(hd0,msdos2,bsd1): Filesystem is ufs2.
grub> ls /
README boot/
grub> cat /README
This file is on a UFS2 filesystem.

grub> halt

So I guess, this second patch solves the problem adequately.
All that remains is the question why --force is needed in grub-install.

Here's the new image, just in case you want to try it. I'll remove
it from that server in a couple of weeks.

http://www.cordula.ws/tempdir/bsddisk_4.7z

Again, thanks for the help. I hope you'll commit that patch soon. ;-)

-cpghost.

-- 
Cordula's Web. http://www.cordula.ws/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]