Commit fc9a01e7 authored by Gerardo Exequiel Pozzi's avatar Gerardo Exequiel Pozzi
Browse files

Remove archiso_early hook, use /dev/disk/by-label/${archisolabel} instead.

Takes the advantage of already symlinks created on /dev/disk/by-label/ by
60-persistent-storage.rules add by udev hook.

Tested on:
* Real machine as CD-ROM and USB key drive.
* KVM as CD-ROM and DISK (for both modes, in combination with IDE and SCSI)
* VirtualBox as IDE CD-ROM.

IMPORTANT note: Since isohybrid is a hack, if more partitions are added to
USB key drive, filesystem on these partitions MUST have LABEL, otherwise
USB key will fail to boot. Anyway there is an option archisodevice=,
to force and specific device where live-media reside.
(Maybe isohybrid will change the hack method used in a future)

More info at:
http://mailman.archlinux.org/pipermail/arch-releng/2010-March/000890.html
http://mailman.archlinux.org/pipermail/arch-releng/2010-March/000913.html



Signed-off-by: default avatarGerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
parent 56750f37
...@@ -7,9 +7,7 @@ install: all ...@@ -7,9 +7,7 @@ install: all
install -D -m 755 testiso $(DESTDIR)/usr/bin/testiso install -D -m 755 testiso $(DESTDIR)/usr/bin/testiso
# hooks/install are needed by mkinitcpio # hooks/install are needed by mkinitcpio
install -D -m 644 hooks/archiso $(DESTDIR)/lib/initcpio/hooks/archiso install -D -m 644 hooks/archiso $(DESTDIR)/lib/initcpio/hooks/archiso
install -D -m 644 hooks/archiso_early $(DESTDIR)/lib/initcpio/hooks/archiso_early
install -D -m 644 install/archiso $(DESTDIR)/lib/initcpio/install/archiso install -D -m 644 install/archiso $(DESTDIR)/lib/initcpio/install/archiso
install -D -m 644 install/archiso_early $(DESTDIR)/lib/initcpio/install/archiso_early
# install docs and examples # install docs and examples
install -d -m 644 $(DESTDIR)/usr/share/archiso/ install -d -m 644 $(DESTDIR)/usr/share/archiso/
cp -r ../configs $(DESTDIR)/usr/share/archiso/configs cp -r ../configs $(DESTDIR)/usr/share/archiso/configs
...@@ -19,8 +17,6 @@ uninstall: ...@@ -19,8 +17,6 @@ uninstall:
rm -f $(DESTDIR)/usr/sbin/mkarchiso rm -f $(DESTDIR)/usr/sbin/mkarchiso
rm -f $(DESTDIR)/usr/bin/testiso rm -f $(DESTDIR)/usr/bin/testiso
rm -f $(DESTDIR)/lib/initcpio/hooks/archiso rm -f $(DESTDIR)/lib/initcpio/hooks/archiso
rm -f $(DESTDIR)/lib/initcpio/hooks/archiso_early
rm -f $(DESTDIR)/lib/initcpio/install/archiso rm -f $(DESTDIR)/lib/initcpio/install/archiso
rm -f $(DESTDIR)/lib/initcpio/install/archiso_early
rm -rf $(DESTDIR)/usr/share/archiso/ rm -rf $(DESTDIR)/usr/share/archiso/
rm -rf $(DESTDIR)/usr/share/doc/archiso/ rm -rf $(DESTDIR)/usr/share/doc/archiso/
...@@ -61,7 +61,7 @@ run_hook () { ...@@ -61,7 +61,7 @@ run_hook () {
fi fi
if [ "x${archisodevice}" = "x" ]; then if [ "x${archisodevice}" = "x" ]; then
archisodevice="/dev/archiso" archisodevice="/dev/disk/by-label/${archisolabel}"
fi fi
# set mount handler for archiso # set mount handler for archiso
......
# vim: set ft=sh:
run_hook ()
{
if [ -n "${archisolabel}" ]; then
echo "ACTION==\"add|change\", SUBSYSTEM==\"block\", IMPORT{program}=\"/sbin/blkid -o udev -p \$tempnode\"" > /lib/udev/rules.d/00-archiso-device.rules
echo "ENV{ID_FS_LABEL_ENC}==\"${archisolabel}\", SYMLINK+=\"archiso\"" >> /lib/udev/rules.d/00-archiso-device.rules
fi
}
...@@ -12,7 +12,13 @@ install () ...@@ -12,7 +12,13 @@ install ()
add_dir /tmpfs add_dir /tmpfs
add_dir /tmpfs.sqfs add_dir /tmpfs.sqfs
add_dir /bootmnt add_dir /bootmnt
add_device /dev/loop0 b 7 0 add_device /dev/loop0 b 7 0
add_binary /lib/udev/cdrom_id
add_file /lib/udev/rules.d/60-cdrom_id.rules
SCRIPT="archiso" SCRIPT="archiso"
} }
......
install ()
{
MODULES=""
BINARIES=""
FILES=""
SCRIPT="archiso_early"
}
# vim:ft=sh:ts=4:sw=4:et:
...@@ -2,5 +2,5 @@ ...@@ -2,5 +2,5 @@
MODULES="" MODULES=""
BINARIES="" BINARIES=""
FILES="" FILES=""
HOOKS="base archiso_early udev archiso pata scsi sata usb fw pcmcia filesystems usbinput" HOOKS="base udev archiso pata scsi sata usb fw pcmcia filesystems usbinput"
COMPRESSION="lzma" COMPRESSION="lzma"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment