Bug#567065: avoid mount -t unknown

2010-01-30 Thread maximilian attems
On Wed, 27 Jan 2010, Joey Hess wrote:

 maximilian attems wrote:
  right that sounds good, will merge soon.
 
 Thanks.

applied, pushing out on repo as soon as back on net.. :)
 
  also it should no longer use the gone udev vol_id,
  but blkid, haven't come around to see it's invocation pattern,
  that should fix it also.
 
 If you have blkid on the initramfs, you can use:
 
 FSTYPE=$(blkid -o value -s TYPE $ROOT)
 
 (It will exit nonzero if it cannot determine the type.)

ok thanks for the hint!
commited.
 
 I was thinking about trying to add btrfs magic to fstype, but if you
 plan to switch to blkid, I will avoid spending time on it.

yes blkid should be fallback for squeeze
(as vol_id was for lenny) and then take over for squeeze+1




-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#567065: avoid mount -t unknown

2010-01-27 Thread maximilian attems
On Tue, Jan 26, 2010 at 09:05:35PM -0500, Joey Hess wrote:
 
 Since fstype does not support btrfs (#548047),
 and since udev 150, vol_id no longer exists,
 get_fstype sets FSTYPE to unknown, and
 then the root filesystem is mounted using
 mount -t unknown /dev/hda2 /root. 
 
 Of course, that fails, and with a really unhelpful error message
 (mount: device doesnot exist)
 
 Why not just skip the -t parameter if FSTYPE=unknown?
 Mounting the root fs was going to fail, so letting
 mount autodetect the fs type can't be worse.
 
 Attached patch does that and got my root on btrfs working.

right that sounds good, will merge soon.

also it should no longer use the gone udev vol_id,
but blkid, haven't come around to see it's invocation pattern,
that should fix it also.
 
 Workaround: boot with rootfstype=btrfs
 

 --- scripts/local.orig2010-01-26 20:58:30.298669269 -0500
 +++ scripts/local 2010-01-26 20:59:28.974718882 -0500
 @@ -127,7 +127,11 @@
  
   # FIXME This has no error checking
   # Mount root
 - mount ${roflag} -t ${FSTYPE} ${ROOTFLAGS} ${ROOT} ${rootmnt}
 + if [ ${FSTYPE} != unknown ]; then
 + mount ${roflag} -t ${FSTYPE} ${ROOTFLAGS} ${ROOT} ${rootmnt}
 + else
 + mount ${roflag} ${ROOTFLAGS} ${ROOT} ${rootmnt}
 + fi
  
   [ $quiet != y ]  log_begin_msg Running /scripts/local-bottom
   run_scripts /scripts/local-bottom






-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#567065: avoid mount -t unknown

2010-01-27 Thread Joey Hess
maximilian attems wrote:
 right that sounds good, will merge soon.

Thanks.

 also it should no longer use the gone udev vol_id,
 but blkid, haven't come around to see it's invocation pattern,
 that should fix it also.

If you have blkid on the initramfs, you can use:

FSTYPE=$(blkid -o value -s TYPE $ROOT)

(It will exit nonzero if it cannot determine the type.)

I was thinking about trying to add btrfs magic to fstype, but if you
plan to switch to blkid, I will avoid spending time on it.

-- 
see shy jo


signature.asc
Description: Digital signature


Bug#567065: avoid mount -t unknown

2010-01-26 Thread Joey Hess
Package: initramfs-tools
Version: 0.93.4
Severity: normal
Tag: patch

Since fstype does not support btrfs (#548047),
and since udev 150, vol_id no longer exists,
get_fstype sets FSTYPE to unknown, and
then the root filesystem is mounted using
mount -t unknown /dev/hda2 /root. 

Of course, that fails, and with a really unhelpful error message
(mount: device doesnot exist)

Why not just skip the -t parameter if FSTYPE=unknown?
Mounting the root fs was going to fail, so letting
mount autodetect the fs type can't be worse.

Attached patch does that and got my root on btrfs working.

Workaround: boot with rootfstype=btrfs

-- Package-specific info:
-- /proc/cmdline
root=/dev/hda2 ro

-- /proc/filesystems
btrfs
ext3
fuseblk

-- lsmod
Module  Size  Used by
i915  217023  2 
drm_kms_helper 17183  1 i915
drm   107507  3 i915,drm_kms_helper
i2c_algo_bit3497  1 i915
ppdev   4058  0 
lp  5570  0 
parport22554  2 ppdev,lp
sco 5837  2 
bridge 32851  0 
stp  996  1 bridge
bnep7376  2 
l2cap  21677  3 bnep
crc16   1027  1 l2cap
bluetooth  36259  5 sco,bnep,l2cap
acpi_cpufreq4907  0 
cpufreq_powersave602  0 
cpufreq_conservative 4018  0 
cpufreq_stats   1940  0 
cpufreq_userspace   1444  0 
binfmt_misc 4875  1 
uinput  4796  1 
fuse   43554  1 
tun 8728  2 
sit 6816  0 
tunnel4 1469  1 sit
ext3   93828  1 
jbd31965  1 ext3
mbcache 3762  1 ext3
loop9721  0 
dm_crypt9059  0 
joydev  6771  0 
snd_hda_codec_realtek   162851  1 
snd_hda_intel  15263  1 
snd_hda_codec  45998  2 snd_hda_codec_realtek,snd_hda_intel
snd_hwdep   4054  1 snd_hda_codec
snd_pcm_oss28479  0 
snd_mixer_oss  10461  1 snd_pcm_oss
snd_pcm47350  3 snd_hda_intel,snd_hda_codec,snd_pcm_oss
snd_seq_midi3480  0 
arc4 974  2 
snd_rawmidi12313  1 snd_seq_midi
ecb 1405  2 
snd_seq_midi_event  3684  1 snd_seq_midi
snd_seq35303  2 snd_seq_midi,snd_seq_midi_event
snd_timer  12258  2 snd_pcm,snd_seq
snd_seq_device  3673  3 snd_seq_midi,snd_rawmidi,snd_seq
iwlagn 62199  0 
snd33551  13 
snd_hda_codec_realtek,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_rawmidi,snd_seq,snd_timer,snd_seq_device
iwlcore67306  1 iwlagn
dell_laptop 1533  0 
i2c_i8016442  0 
psmouse44409  0 
mac80211  121381  2 iwlagn,iwlcore
soundcore   3450  1 snd
dcdbas  3860  1 dell_laptop
serio_raw   2916  0 
battery 3782  0 
jmb38x_ms   5502  0 
i2c_core   12612  4 i915,drm,i2c_algo_bit,i2c_i801
rng_core2178  0 
pcspkr  1207  0 
cfg80211   86910  3 iwlagn,iwlcore,mac80211
ac  1640  0 
rfkill 10196  4 bluetooth,dell_laptop,cfg80211
memstick4348  1 jmb38x_ms
snd_page_alloc  4977  2 snd_hda_intel,snd_pcm
evdev   5609  22 
processor  25803  3 acpi_cpufreq
dm_mod 45854  1 dm_crypt
ide_gd_mod 17103  3 
ide_pci_generic 1924  0 
ata_generic 2015  0 
libata113728  1 ata_generic
scsi_mod  101073  1 libata
uhci_hcd   15953  0 
video  14605  1 i915
r8169  24568  0 
ehci_hcd   27230  0 
piix3564  2 
output  1204  1 video
mii 2714  1 r8169
sdhci_pci   4493  0 
sdhci  12079  1 sdhci_pci
intel_agp  20145  1 
agpgart19516  2 drm,intel_agp
mmc_core   38095  1 sdhci
led_class   1757  2 iwlcore,sdhci
ide_core   63850  3 ide_gd_mod,ide_pci_generic,piix
usbcore97930  3 uhci_hcd,ehci_hcd
button  3598  1 i915
nls_base4541  1 usbcore
thermal 9206  0 
fan 2586  0 
thermal_sys 9378  4 processor,video,thermal,fan
btrfs 362358  1 
zlib_deflate   15822  1 btrfs
crc32c  2172  1 
libcrc32c730  1 btrfs

-- /etc/kernel-img.conf
# Kernel image management overrides
# See kernel-img.conf(5) for details
do_symlinks = yes
relative_links = yes
do_bootloader = no
do_bootfloppy = no
do_initrd = yes
link_in_boot = no