Here is my FS layout as reported by sfdisk
root@dogmatrix:/etc/grub.d# sfdisk -l /dev/sda
Disk /dev/sda: 24321 cylinders, 255 heads, 63 sectors/track
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/sda1 * 0+ 3038 3039- 24410736 a9 NetBSD
end: (c,h,s) expected (1023,254,63) found (1023,224,63)
/dev/sda2 3039 6270 3232 25961040 7 HPFS/NTFS
start: (c,h,s) expected (1023,254,63) found (1023,225,1)
end: (c,h,s) expected (1023,254,63) found (1023,224,63)
/dev/sda3 6271 23045- 16775- 134742352+ 5 Extended
start: (c,h,s) expected (1023,254,63) found (1023,225,1)
end: (c,h,s) expected (1023,254,63) found (1023,239,63)
/dev/sda4 23045+ 24320 1276- 10244272+ 83 Linux
start: (c,h,s) expected (1023,254,63) found (1023,0,1)
end: (c,h,s) expected (1023,254,63) found (1023,14,63)
/dev/sda5 6271+ 9917- 3647- 29287408+ 83 Linux
start: (c,h,s) expected (1023,254,63) found (0,16,1)
end: (c,h,s) expected (1023,254,63) found (1023,14,63)
/dev/sda6 9917+ 10646- 730- 5858968+ 82 Linux swap / Solaris
start: (c,h,s) expected (1023,254,63) found (0,1,1)
end: (c,h,s) expected (1023,254,63) found (774,239,63)
/dev/sda7 10646+ 23045- 12400- 99595408+ 83 Linux
start: (c,h,s) expected (1023,254,63) found (0,1,1)
end: (c,h,s) expected (1023,254,63) found (1023,239,63)
/dev/sda8 0+ 3038 3039- 24410736
/dev/sda9 3039 6270 3232 25961040
/dev/sda10 23045+ 24320 1276- 10244272+
/dev/sda11 6271+ 9917- 3647- 29287408+
/dev/sda12 9917+ 10646- 730- 5858968+
/dev/sda13 10646+ 23045- 12400- 99595408+
root@dogmatrix:/etc/grub.d#
And this is the output from grub-probe
root@dogmatrix:/etc/grub.d# /usr/sbin/grub-probe --device /dev/sda4 --target=fs
ufs1
root@dogmatrix:/etc/grub.d# mount
/dev/sda4 on / type ext3 (rw,relatime,errors=remount-ro,commit=0)
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
/dev/sda7 on /home type ext2 (rw,noatime)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
root@dogmatrix:/etc/grub.d#
sda4 is not ufs1, I do have a ufs partition on this disk (sda1), but
sda4 is not it. This is causing grub-mkconfig to generate bogus
entries in the 10_linux (os-prober?) script and screwing up my
grub.cfg file.
It appears that grub-probe is returning the fs type of whatever
partition is marked as bootable, and not the fs type of the partition
queried.
root@dogmatrix:/etc/grub.d# /usr/sbin/grub-probe --device /dev/sda1 --target=fs
ufs1
root@dogmatrix:/etc/grub.d# /usr/sbin/grub-probe --device /dev/sda4 --target=fs
ufs1
root@dogmatrix:/etc/grub.d# /usr/sbin/grub-probe --device /dev/sda2 --target=fs
ufs1
-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.32-3-amd64 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash
Versions of packages grub-common depends on:
ii base-files 5.3 Debian base system miscellaneous f
ii dpkg 1.15.5.6 Debian package management system
ii gettext-base 0.17-10 GNU Internationalization utilities
ii install-info 4.13a.dfsg.1-5 Manage installed documentation in
ii libc6 2.10.2-6 Embedded GNU C Library: Shared lib
ii libfreetype6 2.3.11-1 FreeType 2 font engine, shared lib
ii zlib1g 1:1.2.3.4.dfsg-3 compression library - runtime
Versions of packages grub-common recommends:
ii os-prober 1.36 utility to detect other OSes on a
Versions of packages grub-common suggests:
pn grub-emu <none> (no description available)
pn multiboot-doc <none> (no description available)
-- no debconf information
--
To UNSUBSCRIBE, email to debian-bugs-...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
--
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
(this is the output from the older grub2)
root@dogmatrix:~# dpkg-query -s grub-common
Package: grub-common
Status: install ok installed
Priority: extra
Section: admin
Installed-Size: 2444
Maintainer: GRUB Maintainers <pkg-gru...@lists.alioth.debian.org>
Architecture: amd64
Source: grub2
Version: 1.97+20091115-1
Replaces: grub-coreboot (<< 1.97+20091114-1), grub-efi (<<
1.96+20080831-1), grub-ieee1275 (<< 1.96+20080831-1), grub-linuxbios
(<< 1.96+20080831-1), grub-pc (<< 1.97+20091114-1)
Depends: libc6 (>= 2.3), libfreetype6 (>= 2.2.1), zlib1g (>= 1:1.1.4),
base-files (>= 4.0.1~)
Recommends: os-prober (>= 1.33)
Suggests: multiboot-doc, grub-emu
Conflicts: grub-doc (<< 0.97-32), grub-legacy-doc (<< 0.97-59), mdadm
(<< 2.6.7-2)
Conffiles:
/etc/grub.d/README be58f42dfe74feb6eeb98c6a843c743f
/etc/grub.d/10_linux ef73bcd6544dc221f68fbe9c359411eb
/etc/grub.d/00_header 7eadb1c796713b39f03a8bf6d9c31c62
/etc/grub.d/40_custom babe7de352fe18de5a238569cf4b8a11
/etc/grub.d/30_os-prober 42c94154d1830d3945a427e18877f4ca
Description: GRand Unified Bootloader, version 2 (common files)
This package contains common files shared by the distinct flavours of GRUB.
Homepage: http://www.gnu.org/software/grub/grub-2.en.html
root@dogmatrix:~#
root@dogmatrix:~# grub-probe --device /dev/sda4 --target=fs
ext2
root@dogmatrix:~#
root@dogmatrix:~# grub-probe --verbose --device /dev/sda4 --target=fs
grub-probe: info: the size of hd0 is 390721968
grub-probe: info: the size of hd0 is 390721968
grub-probe: info: the size of hd0 is 390721968
grub-probe: info: the size of hd0 is 390721968
grub-probe: info: the size of hd0 is 390721968
grub-probe: info: the size of hd0 is 390721968
grub-probe: info: the size of hd0 is 390721968
grub-probe: info: the size of hd0 is 390721968
grub-probe: info: the size of hd0 is 390721968
grub-probe: info: the size of hd0 is 390721968
grub-probe: info: the size of hd0 is 390721968
grub-probe: info: the size of hd0 is 390721968
grub-probe: info: the size of hd0 is 390721968
grub-probe: info: the size of hd0 is 390721968
grub-probe: info: the size of hd0 is 390721968
grub-probe: info: the size of hd0 is 390721968
grub-probe: info: the size of hd0 is 390721968
grub-probe: info: the size of hd0 is 390721968
grub-probe: info: the size of hd0 is 390721968
grub-probe: info: the size of hd0 is 390721968
grub-probe: info: the size of hd0 is 390721968
grub-probe: info: the size of hd0 is 390721968
grub-probe: info: the size of hd0 is 390721968
grub-probe: info: the size of hd0 is 390721968
grub-probe: info: the size of hd0 is 390721968
grub-probe: info: the size of hd0 is 390721968
grub-probe: info: the size of hd0 is 390721968
grub-probe: info: the size of hd0 is 390721968
grub-probe: info: /dev/sda4 starts from 370228320
grub-probe: info: opening the device hd0
grub-probe: info: the size of hd0 is 390721968
grub-probe: info: DOS partition 0 starts from 63
grub-probe: info: BSD partition 0,a starts from 63
grub-probe: info: BSD partition 0,f starts from 48821535
grub-probe: info: BSD partition 0,g starts from 370228320
grub-probe: info: opening hd0,1,g
grub-probe: info: the size of hd0 is 390721968
ext2
root@dogmatrix:~#
A few reboots and some cursing later.. (what follows is from the latest grub2).
root@dogmatrix:~#
root@dogmatrix:~# /usr/sbin/grub-probe --verbose --device /dev/sda4
/usr/sbin/grub-probe: info: cannot open `/boot/grub/device.map'.
/usr/sbin/grub-probe: info: /dev/sda4 starts from 370228320.
/usr/sbin/grub-probe: info: opening the device /dev/sda.
/usr/sbin/grub-probe: info: the size of /dev/sda is 390721968.
/usr/sbin/grub-probe: info: DOS partition 0 starts from 63.
/usr/sbin/grub-probe: info: BSD partition 0,a starts from 63.
/usr/sbin/grub-probe: info: BSD partition 0,f starts from 48821535.
/usr/sbin/grub-probe: info: BSD partition 0,g starts from 370228320.
/usr/sbin/grub-probe: info: opening /dev/sda,1,a.
/usr/sbin/grub-probe: info: the size of /dev/sda is 390721968.
ufs1
root@dogmatrix:~#
root@dogmatrix:~# dpkg-query -s grub-common
Package: grub-common
Status: install ok installed
Priority: extra
Section: admin
Installed-Size: 4192
Maintainer: GRUB Maintainers <pkg-gru...@lists.alioth.debian.org>
Architecture: amd64
Source: grub2
Version: 1.98-1
Replaces: grub-coreboot (<< 1.97+20091114-1), grub-efi (<<
1.96+20080831-1), grub-ieee1275 (<< 1.96+20080831-1), grub-linuxbios
(<< 1.96+20080831-1), grub-pc (<< 1.97+20091114-1)
Depends: base-files (>= 4.0.1~), dpkg (>= 1.15.4) | install-info |
dpkg (<= 1.14.25), libc6 (>= 2.3), libfreetype6 (>= 2.2.1), zlib1g (>=
1:1.1.4), gettext-base
Recommends: os-prober (>= 1.33)
Suggests: multiboot-doc, grub-emu
Conflicts: grub-doc (<< 0.97-32), grub-legacy-doc (<< 0.97-59), mdadm
(<< 2.6.7-2)
Conffiles:
/etc/grub.d/10_linux c9e493e3bcf41b4abef3e2d1c1927e7d
/etc/grub.d/README be58f42dfe74feb6eeb98c6a843c743f
/etc/grub.d/30_os-prober 543b8f6ec0bab559ac3117cff1f1271d
/etc/grub.d/40_custom babe7de352fe18de5a238569cf4b8a11
/etc/grub.d/00_header 577b1b6075f5e8ed8bba8b5dd62ed46a
Description: GRand Unified Bootloader, version 2 (common files)
This package contains common files shared by the distinct flavours of GRUB.
Homepage: http://www.gnu.org/software/grub/grub-2.en.html
root@dogmatrix:~#
root@dogmatrix:~#