summaryrefslogtreecommitdiff
path: root/archiso/hooks
AgeCommit message (Collapse)Author
2010-10-12[archiso] Update nbd hook to match newer nbd operation mode.Gerardo Exequiel Pozzi
Newer nbd-server uses config file instead of parameters via cmd line (deprecated). Also does not use a fixed port (oldstyle). Sample nbd-server.conf that works with this change: -- CUT HERE -- [generic] [archiso] readonly = true exportname = /tmp/archlinux.iso -- CUT HERE -- Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2010-07-13[archiso_pxe_nbd] Remove unneeded umount commandsGerardo Exequiel Pozzi
This step is now done at archiso hook (commit 1fc3a61b75) Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2010-07-09Call launch_interactive_shell in more cases of error.Gerardo Exequiel Pozzi
A shell prompt is at least better than a kernel panic :) Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2010-07-09Rename directories and parameteres to be more descriptiveGerardo Exequiel Pozzi
* squashfs images that will be part of read-only branchs for union mount in / are mounted on /ro_branch/{image_name} instead of /tmpfs/mnt/{image_name} (and avoid empty dirs on live env under /mnt) * tmpfs that will be part of read-write branch for union mount in / is mounted on /rw_branch instead of /tmpfs * tmpfs that is for store *.sqfs images when copytoram=y, is mounted on /copytoram instead of /tmpfs.sqfs * tmpfs_size= parameter renamed to rw_branch_size= * tmpfs_sqfs_size= parameter renamed to copytoram_size= Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2010-07-09First mount ${archisodevice} before other mountsGerardo Exequiel Pozzi
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2010-07-08archiso hook: umount /bootmnt if copytoram=yGerardo Exequiel Pozzi
More generic way than current method, and fix if logic (inverted). Takes the same actions independent of medium (disk/cdrom). Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2010-07-05Mount tmpfs filesystems with mode=0755Gerardo Exequiel Pozzi
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2010-06-04Add optional command line parameter: archisobasedirThomas Bächler
When remastering the image onto a USB volume, you might want to reuse an existing partition without filling the root with lots of archiso files. The archisobasedir parameter allows to specify a new root directory, isomounts and all images will be searched in this directory.
2010-03-21[archiso] Add support to setups with more than one network card.Gerardo Exequiel Pozzi
Otherwise archiso_pxe_nbd hook can configure the incorrect network card, because ipconfig will configure all interfaces available. Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2010-03-18[archiso] Use a mount handler in archiso_pxe_nbd hookGerardo Exequiel Pozzi
* Register a mount_hook if booted via PXE. This allows to do all needed steps before and after calling archiso_mount_handler. * umount and disconnect network device if copytoram=y Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2010-03-18[archiso] Rename nbd hook to archiso_nbdGerardo Exequiel Pozzi
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2010-03-17[archiso] Add nbd hook, to make posible boot archiso from PXE via a NBD.Gerardo Exequiel Pozzi
nbd (network block device utilities) package is required. This package is in AUR at this moment: http://aur.archlinux.org/packages.php?ID=9691 Also mkinitcpio-nfs-utils is required for ipconfig. Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2010-03-16Remove archiso_early hook, use /dev/disk/by-label/${archisolabel} instead.Gerardo Exequiel Pozzi
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: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2010-03-15Fixed msg about copying images to RAMGerardo Exequiel Pozzi
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2010-03-06Add -p to blkid in hooks, to bypass the cache like in udev rules.Gerardo Exequiel Pozzi
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2010-03-01Split aufs mount command from _mnt_squashfs()Gerardo Exequiel Pozzi
New function _mnt_aufs(). Don't display incorrect message (Adding new aufs...) when no aufs branch is mounted, because mount type is bind. Also, makes the code more clean :) Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2010-03-01Welcome back copytoram= optionGerardo Exequiel Pozzi
Fixes FS#17182: copytoram=y does not work with aufs The solution is simple, just use a directory outside aufs tree. * If copytoram=y, then another tmpfs is mounted but on /tmpfs.sqfs * Add a new option: tmpfs_sqfs_size= (default to 75%) * Lock cdrom drive is not locked if copytoram=y Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2010-02-18Rename archiso-early hook to archiso_earlyGerardo Exequiel Pozzi
To make compatible with disablehooks= param. Since "hook_archiso-early" is not a valid variable name. Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2010-02-17Removed a non-working option: copytoramGerardo Exequiel Pozzi
Keep the code clean. For more reference see FS#17182 to view what is the issue Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2010-02-17Fix coding style in archiso hookGerardo Exequiel Pozzi
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2010-02-17Pass $newroot as part of the $mountpoint avoiding a global variableGerardo Exequiel Pozzi
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2010-02-17Take advantage of module autoloading when mounting images as loopGerardo Exequiel Pozzi
* Make first /dev/loop0 device at archiso install hook. * Remove unneeded losetup, all is done directly via mount. * Images are now mounted on /tmpfs/mnt/image-name instead of /tmpfs/mnt/loopN, removing unneeded counter. * Add some variables to make code more readable. Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2010-02-17Drop to recovery shell when mounting main media filesystem fails.Gerardo Exequiel Pozzi
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2010-02-16Implement mount hook function in archiso hook.Gerardo Exequiel Pozzi
Next version of mkinitcpio > 0.6.2 implements mount hook functionality. So can avoid skipping normal flow of main init script, and removing common end code with it. Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2010-02-06Remove special handling for vfat, all done via blkidGerardo Exequiel Pozzi
* Add archisodevide= boot option (suggested by brain0) (if declared use it, if not use /dev/archiso created via udev rule) * Removed redundant modprobe commands, (modules are loaded automatically on mount -t) * Other minor changes Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2010-02-06Update archiso hooks to work with next mkinitcpio 0.6Gerardo Exequiel Pozzi
Some basic changes to make archiso hooks work with the next mkinitcpio 0.6 Tested under KVM, a ""2010.02"" and works fine with it. NOTE: current mkinitcpio-0.5.99.2-2 does not include "losetup", maybe will be included in next version, see #[1]. For now must be added manually. Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2009-12-01Add an error message when mounting aufs fails, then exit 1Gerardo Exequiel Pozzi
Closes FS#13381. Waiting 30 seconds for device /dev/archiso ... SUCCESS: Mounted archiso volume successfully. squashfs: version 4.0 (2009/01/31) Phillip Lougher aufs 2-standalone.tree-20090907 :: Mounting root (aufs) filesystem aufs au_xino_do_write:371:mount[407]: I/O Error, write failed (4294967268) aufs au_xino_set:1115:mount[407]: I/O Error, failed creating xino(-5). mount: Invalid argument ERROR: while mounting root (aufs) filesystem. Kernel panic - not syncing: Attempted to kill init! Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2009-11-17Only lock the optical drive if mounted from thisGerardo Exequiel Pozzi
Check if FSTYPE is iso9660 or UDF, and only in this case look the optical drive. Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2009-11-17Rename ramdisk_size parameter to tmpfs_size to avoid conflictGerardo Exequiel Pozzi
Rename ramdisk_size parameter to tmpfs_size to avoid conflict with the kernel parameter that is for old ramdisk based blockdevs (/dev/ramN) and confusion to users. The kernel parameter ramdisk_size=N is in "N * k size", while tmpfs size=N is in "N * [ k | m | g ] byte size" or "in N% of RAM", like is used by default on archiso. This parameter is used only for tmpfs in size option. Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2009-10-26Support custom isomounts in archiso hook.Gerardo Exequiel Pozzi
Implement this feature request: FS#16835 - isomounts file whithin archiso hook is inflexible Add an optional "isomounts" kernel command line parameter. In this way, can have differents combinations of kernels/ramdisk/filesystems.sqfs on the same media. Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2009-08-25Added vfat support to mount /dev/archisoGerhard Brauer
fstype from klibc don't detect a vfat formatted blockdevice when try to mount /dev/archiso to /bootmnt. Some users don't use the recommened method with dd to bring the image to their USB stick. If they for ex. use Unetbootin to put the iso image on their (v)fat formatted stick they got lost with a kernel panic cause fstype won't detect vfat, so the mount and the later squashfs bindings traps. Signed-off-by: Gerhard Brauer <gerbra@archlinux.de>
2009-08-10Fix mount loop test for bindingsAaron Griffin
test -f will fail if we wanted to bind to a directory, so use test -r instead. See FS#15356 Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-08-10Ensure bootmnt is bound properly into device rootAaron Griffin
Missing slash caused bootmnt to be bound to /real_rootbootmnt instead of /real_root/bootmnt See FS#15356 Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-07-27Use the archisolabel= command line option to mount the archiso device.Gerhard Brauer
If the archisolabel= option is specified on the kernel commandline, a device /dev/archiso will be created and will be used to boot the live system. Patch from brain0 <thomas@archlinux.org> Signed-off-by: Gerhard Brauer <gerbra@archlinux.de> Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-06-12Fix a typo in the archiso hookSven-Hendrik Haase
remount,append=: should be remount,append: Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-06-08Replace aufs 'add' with 'append'Aaron Griffin
Change via AUR package Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-04-14Replace unionfs with aufsAaron Griffin
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-01-30Fix a typo in the archiso-early hookAaron Griffin
Wrong slash! No idea how that happened :) Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-01-29Increment usbdelay by 1 before sleepingAaron Griffin
This should give us *just a bit* more delay before actually trying to do things with the usb devices. Annoying, but will probably be effective Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-01-26Fix typos, formatting, and vague language where possible.Loui Chang
Signed-off-by: Loui Chang <louipc.ist@gmail.com> [Fixed menu.lst: LiveCD -> Live CD -aaron] Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-01-24Advanced USB delay handlingAaron Griffin
USB boot delay is now handled with the usbdelay kernel param (default=0) We use the built in delay of usb-storage to control this. by setting the module's delay param. If your USB device doesn't work on first boot, try setting usbdelay=10 or so Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-01-24Add a manual sleep and rootdelayAaron Griffin
It seems udev trigger/settle doesn't do what we expect, so we'll add functionality for the rootdelay param back in here. This should help fix FS#12896 Original-idea: Gerhard Brauer <gerbra@archlinux.de> Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-12-23Fix the way squashfs mountpoints are handledAaron Griffin
This is a hacky way to mount squashfs images at directories other than the root. We mount the image to a loop device and then bind it to another directory. This technically supersedes the 'bind' image type, so that should be removed... Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-12-23Fix the last "device exists check"Gerhard Brauer
Looks like my last-minute addition was goofed. Use && not || Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-12-23Add existence checks to the boot-media scanAaron Griffin
This prevents some cosmetic errors when globbing fails and the scripts try to mount something silly like "/dev/hd[a-z]" Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-12-23Cleanup archiso hookAaron Griffin
Fix squashfs mounting of all isomounts images, along with a few other changes Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-12-18Change mounts file to isomountsAaron Griffin
Also check for this file instead of the root image on mount, to make images more generic Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-12-18Support mutli-arch disks by specifying the archAaron Griffin
Specify the arch on the command line and mountpoints so that we can support mutli-arch livecds Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-11-13Update archiso hook to match root image namingSimo Leone
It's called root-image.sqfs rather than archiso.sqfs nowadays. Signed-off-by: Simo Leone <simo@archlinux.org>
2008-11-13Fix loop device mountingSimo Leone
Take away redirects so error messages are readable, and wait to make sure udev creates the loopback devices before we try to use them. Signed-off-by: Simo Leone <simo@archlinux.org>