Bug#609964: use blkid to correctly set UUID for RESUME
On 14.01.2011 15:08, maximilian attems wrote: > On Fri, Jan 14, 2011 at 02:59:57PM +0100, Michael Biebl wrote: >> >>> the cost of a command call is very small as it is a shell builtin. >> >> Well, command will not check for the existence of blkid, but execute blkid, >> so >> in effect it is executed *twice*. >> Maybe you want something like "type blkid" instead? > > No, why would command -v execute blkid? > Please read man dash and do an strace if you don't believe me. Ah, no. I just missed the "-v". Sorry for the noise. -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth? signature.asc Description: OpenPGP digital signature
Bug#609964: use blkid to correctly set UUID for RESUME
On Fri, Jan 14, 2011 at 02:59:57PM +0100, Michael Biebl wrote: > > > the cost of a command call is very small as it is a shell builtin. > > Well, command will not check for the existence of blkid, but execute blkid, so > in effect it is executed *twice*. > Maybe you want something like "type blkid" instead? No, why would command -v execute blkid? Please read man dash and do an strace if you don't believe me. > Anyway, do you intead to get this fix into squeeze? No, it is not scheduled for squeeze, as it didn't strike on anybody. d-i does the same dance by themself and generates that file. Currently unless prooven otherwisse I see it as cleanup patch. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#609964: use blkid to correctly set UUID for RESUME
On 14.01.2011 14:51, maximilian attems wrote: > On Fri, Jan 14, 2011 at 02:47:54PM +0100, Michael Biebl wrote: >> On 14.01.2011 14:39, maximilian attems wrote: >>> On Fri, Jan 14, 2011 at 02:21:39PM +0100, Michael Biebl wrote: >> >>> thanks please take a look at git initramfs-tools, it is in one of >>> those maks branches, hmm looking up -> maks/preinst_blkid >>> http://git.debian.org/?p=kernel/initramfs-tools.git;a=summary >> >> Ah cool. >> >> FWIW, I think you can drop the vol_id fallback, as the code will be only run >> on >> fresh installations anyway, but not on upgrades. >> That said, blkid worked fine for me on both lenny and squeeze. >> Do you know of cases where e2fsprogs' blkid does not work and using the old >> vol_id would be preferable? >> I also think, you don't need to run blkid *twice* and you can simply remove >> the >> "if command ..." check > > I prefer longer backward compatibility and not assume commands to be there. Very well then. > the cost of a command call is very small as it is a shell builtin. Well, command will not check for the existence of blkid, but execute blkid, so in effect it is executed *twice*. Maybe you want something like "type blkid" instead? Anyway, do you intead to get this fix into squeeze? Cheers, Michael -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth? signature.asc Description: OpenPGP digital signature
Bug#609964: use blkid to correctly set UUID for RESUME
On Fri, Jan 14, 2011 at 02:47:54PM +0100, Michael Biebl wrote: > On 14.01.2011 14:39, maximilian attems wrote: > > On Fri, Jan 14, 2011 at 02:21:39PM +0100, Michael Biebl wrote: > > > thanks please take a look at git initramfs-tools, it is in one of > > those maks branches, hmm looking up -> maks/preinst_blkid > > http://git.debian.org/?p=kernel/initramfs-tools.git;a=summary > > Ah cool. > > FWIW, I think you can drop the vol_id fallback, as the code will be only run > on > fresh installations anyway, but not on upgrades. > That said, blkid worked fine for me on both lenny and squeeze. > Do you know of cases where e2fsprogs' blkid does not work and using the old > vol_id would be preferable? > I also think, you don't need to run blkid *twice* and you can simply remove > the > "if command ..." check I prefer longer backward compatibility and not assume commands to be there. the cost of a command call is very small as it is a shell builtin. it is noted to disappear after Wheezy release whenever that may happen. (: good weekend. -- maks -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#609964: use blkid to correctly set UUID for RESUME
On 14.01.2011 14:39, maximilian attems wrote: > On Fri, Jan 14, 2011 at 02:21:39PM +0100, Michael Biebl wrote: > thanks please take a look at git initramfs-tools, it is in one of > those maks branches, hmm looking up -> maks/preinst_blkid > http://git.debian.org/?p=kernel/initramfs-tools.git;a=summary Ah cool. FWIW, I think you can drop the vol_id fallback, as the code will be only run on fresh installations anyway, but not on upgrades. That said, blkid worked fine for me on both lenny and squeeze. Do you know of cases where e2fsprogs' blkid does not work and using the old vol_id would be preferable? I also think, you don't need to run blkid *twice* and you can simply remove the "if command ..." check Cheers, Michael -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth? signature.asc Description: OpenPGP digital signature
Bug#609964: use blkid to correctly set UUID for RESUME
On Fri, Jan 14, 2011 at 02:21:39PM +0100, Michael Biebl wrote: > Package: initramfs-tools > Version: 0.98.7 > Severity: important > Tags: patch > > Hi, > > while looking at initramfs-tools.preinst code, I noticed that it still > uses vol_id, which is no longer shipped in squeeze. > As a result, UUID will never be set. > > The attached patch used blkid, which is both shipped in lenny and > squeeze (e2fsprogs resp. util-linux). Both are essential packages, so I > added no further checks. > > A quick test with the attached patch on a lenny and squeeze system was > successful. > > Cheers, > Michael thanks please take a look at git initramfs-tools, it is in one of those maks branches, hmm looking up -> maks/preinst_blkid http://git.debian.org/?p=kernel/initramfs-tools.git;a=summary happy hacking -- maks -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#609964: use blkid to correctly set UUID for RESUME
Package: initramfs-tools Version: 0.98.7 Severity: important Tags: patch Hi, while looking at initramfs-tools.preinst code, I noticed that it still uses vol_id, which is no longer shipped in squeeze. As a result, UUID will never be set. The attached patch used blkid, which is both shipped in lenny and squeeze (e2fsprogs resp. util-linux). Both are essential packages, so I added no further checks. A quick test with the attached patch on a lenny and squeeze system was successful. Cheers, Michael -- Package-specific info: -- initramfs sizes -rw-r--r-- 1 root root 13M Jan 12 22:47 /boot/initrd.img-2.6.32-5-686 -rw-r--r-- 1 root root 11M Jan 7 04:51 /boot/initrd.img-2.6.37 -- /proc/cmdline BOOT_IMAGE=/boot/vmlinuz-2.6.37 root=UUID=9a6d2bd2-58d1-4a75-baff-166b8637e3cc ro quiet splash -- resume RESUME=LABEL=Swap -- /proc/filesystems ext2 ext3 ext4 fuseblk -- lsmod Module Size Used by ppp_async 5321 0 ipw2200 109276 0 michael_mic 1498 4 arc4 986 2 ecb 1417 2 lib80211_crypt_tkip 6563 1 aes_i5866820 1 aes_generic25726 1 aes_i586 lib80211_crypt_ccmp 3593 1 sco 6144 2 rfcomm 23650 8 bnep7540 2 l2cap 27437 16 rfcomm,bnep binfmt_misc 4925 1 acpi_cpufreq4513 0 mperf803 1 acpi_cpufreq ppdev 4145 0 cpufreq_userspace 1396 0 lp 5693 0 cpufreq_stats 1944 0 cpufreq_powersave614 0 vboxnetadp 5278 0 cpufreq_conservative 6154 0 vboxnetflt 12943 0 vboxdrv 125804 2 vboxnetadp,vboxnetflt fuse 46818 3 usblp 7831 0 snd_intel8x0 19539 1 snd_intel8x0m 8112 0 snd_ac97_codec 77252 2 snd_intel8x0,snd_intel8x0m pcmcia 25159 0 ac97_bus 718 1 snd_ac97_codec btusb 8113 2 libipw 18299 1 ipw2200 snd_pcm47284 3 snd_intel8x0,snd_intel8x0m,snd_ac97_codec cfg80211 96303 2 ipw2200,libipw bluetooth 38051 9 sco,rfcomm,bnep,l2cap,btusb yenta_socket 16338 0 snd_seq34617 0 i2c_i8016218 0 lib802112746 4 ipw2200,lib80211_crypt_tkip,lib80211_crypt_ccmp,libipw pcmcia_rsrc 7344 1 yenta_socket snd_timer 12129 2 snd_pcm,snd_seq pcmcia_core 8201 3 pcmcia,yenta_socket,pcmcia_rsrc smsc_ircc2 8948 0 psmouse39035 0 snd_seq_device 3661 1 snd_seq parport_pc 15927 1 snd33366 9 snd_intel8x0,snd_intel8x0m,snd_ac97_codec,snd_pcm,snd_seq,snd_timer,snd_seq_device processor 21812 2 acpi_cpufreq shpchp 18255 0 rng_core2298 0 parport22182 3 ppdev,lp,parport_pc soundcore 3390 1 snd video 9844 0 serio_raw 2912 0 snd_page_alloc 4921 3 snd_intel8x0m,snd_intel8x0,snd_pcm pci_hotplug16947 1 shpchp rfkill 10452 4 cfg80211,bluetooth irda 71565 1 smsc_ircc2 crc_ccitt 1043 2 ppp_async,irda tpm_tis 5452 0 pcspkr 1215 0 evdev 5796 16 joydev 7007 0 thermal_sys 9274 2 processor,video tpm 8097 1 tpm_tis tpm_bios3577 1 tpm output 1216 1 video button 3626 0 container 1865 0 battery 4306 0 ac 1700 0 dm_mod 47476 0 ppp_generic16504 1 ppp_async slhc3551 1 ppp_generic loop 10615 0 autofs416222 7 hid_microsoft 1931 0 usbhid 26611 0 hid51772 2 hid_microsoft,usbhid usb_storage30441 0 uas 0 radeon621388 2 uhci_hcd 15810 0 ttm36671 1 radeon ehci_hcd 28136 0 wbsd8558 0 drm_kms_helper 19531 1 radeon sg 15973 0 8139too14414 0 drm 118815 4 radeon,ttm,drm_kms_helper usbcore95726 8 usblp,btusb,usbhid,usb_storage,uas,uhci_hcd,ehci_hcd firewire_ohci 19546 0 sr_mod 11018 0 mmc_core 45379 1 wbsd 8139cp 13066 0 firewire_core 35038 1 firewire_ohci cdrom 26530 1 sr_mod i2c_algo_bit3389 1 radeon crc_itu_t 1013 1 firewire_core mii