Commit Graph

291 Commits

Author SHA1 Message Date
Gerardo Exequiel Pozzi
90cfe3ce2c [archiso] Add checksum= boot param
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2011-08-15 01:07:31 -03:00
Gerardo Exequiel Pozzi
57d2ea1f4b [archiso] Add dm_snap_prefix= boot param.
Default value is "arch". This implies that all device mapper node
for snapshot devices will be for example: arch_root-image.

This helps AIF to hidden these devices from "Device Configuration".

Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2011-08-09 16:28:52 -03:00
Gerardo Exequiel Pozzi
41dd5bf633 [archiso_pxe_nbd] Allow change NBD export name.
Requested at FS#25051

Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2011-07-09 15:14:50 -03:00
Gerardo Exequiel Pozzi
8fa4f8dedf [archiso] Update for mkinitcpio >= 0.7
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2011-07-09 15:14:49 -03:00
Gerardo Exequiel Pozzi
3101e8d904 [archiso] Create correctly loop devs if loop.max_part > 0
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2011-07-09 15:14:49 -03:00
Gerardo Exequiel Pozzi
f769fed16c [archiso] Update Makefile
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2011-07-09 15:14:49 -03:00
Gerardo Exequiel Pozzi
bdd302adaa Avoid killing nbd-daemon on shutdown
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2011-07-09 15:14:49 -03:00
Gerardo Exequiel Pozzi
93763a2d82 [archiso] Delete etc/mtab on _cleanup step
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2011-07-09 15:14:49 -03:00
Gerardo Exequiel Pozzi
0d895a225a [archiso] Ensure that there is no .fs before create it
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2011-07-09 15:14:49 -03:00
Gerardo Exequiel Pozzi
98c457c26f [archiso] mark installed packages, after installing it, not before
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2011-07-09 15:14:49 -03:00
Gerardo Exequiel Pozzi
85d243ff58 [archiso] Use dm-snapshot instead of aufs2 (A.K.A. "The Big Commit")
* Use device mapper + snapshot module, instead union layer filesystem.
  * A block-level approach vs vfs-level.
  * No more unofficial (Linux) things.
  * More memory is needed.
* Refactor mkarchiso.
* Refactor hooks/archiso.
* Fix install/archiso_pxe_nbd
  (due recent change in mkinitcpio-0.6.15 on checked_modules()/all_modules())
  [Thanks Dave for the improved workaround]
* New configs/releng to build official images.
  * Works with a Bash script instead of Makefile.
    (better control and easy to maintain)
* Remove configs/syslinux-iso.
* Remove archiso2dual script. Integrate functionality in configs/releng.
* New configs/baseline to build the most basic live medium or use as template.
* New README (draft). [Thanks Dieter for fixing english grammar]

Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2011-06-18 18:38:27 -03:00
Gerardo Exequiel Pozzi
b340aae9b1 [archiso] Update fstab and "source dev" of aufs.
* Change from none -> union (looks like util-linux is confused BUG?)
    Avoid the message: "umount aufs failed: not found" at shutdown.
    #1 mount -t tmpfs none /something
    #2 mount -t tmpfs xxxx /something
    The output of findmnt -rnu -o SOURCE will be blank in #1.

* Change from aufs -> auto, make its more generic.

* Update devpts and shm entries.

Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2011-05-07 17:41:33 -03:00
Gerardo Exequiel Pozzi
54be7d1529 [archiso] Set default SquashFS compressor to XZ
Also change all references from lzma to xz format.

Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2011-04-11 10:25:37 -03:00
Simo Leone
5d775d7236 Fix old port reference in NBD boot script 2011-03-20 16:51:46 -03:00
Gerardo Exequiel Pozzi
6bcbf95f82 [archiso] Fix tabs/spaces in mkarchiso
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2010-12-08 14:47:45 -03:00
Gerardo Exequiel Pozzi
0ff40f153a [archiso] Use poll_device() in _pxe_nbd and _loop_mnt hooks.
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2010-12-08 14:44:48 -03:00
Gerardo Exequiel Pozzi
85d2ddd762 Unify scheme of sed replacements.
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2010-12-07 23:48:24 -03:00
Gerardo Exequiel Pozzi
06a8c66eae [archiso] Add support to mount iso in loopback mode.
Add two parameters:

img_dev=/dev/sdNM
   where /dev/sdNM is the device where .iso is located.
img_loop=/path/to/arch.iso
   where /path/to/arch.iso is the full path of the .iso in the device img_dev.

Original idea from Baurzhan Muftakhidinov.

Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2010-12-07 23:48:24 -03:00
Gerardo Exequiel Pozzi
02caf25be9 [archiso] Place *.sqfs images in /${install_dir}/${arch}/
Unify with dir layout of -dual images.

Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2010-12-07 23:48:23 -03:00
Gerardo Exequiel Pozzi
c186a206a1 [archiso] Add -D <install_dir> option to mkarchiso
-D <install_dir> allow to select install directory on target media
                  defaults to "arch".

There is a new %INSTALL_DIR% macro for syslinux.cfg.

This is how ISO will look now:
/syslinux    only syslinux related files (syslinux.cfg, *.c32, etc)
/arch/       isomounts + *.sqfs images
/arch/boot/  Linux + initramfs + Memtest86+ + other files for early boot stage

Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2010-11-30 21:55:13 -03:00
Gerardo Exequiel Pozzi
487436b8ea [archiso] Add support for squashfs compression types
Add a note about supported status in Linux versions.
Needs squashfs-tools-4.1 (now on extra).

Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2010-10-18 18:59:31 -03:00
Thomas Bächler
13c541e8a6 Do not unset archisobasedir when it's set
This was wrong and can never have worked. Fix it.
2010-10-17 16:35:27 +02:00
Gerardo Exequiel Pozzi
24885e4c81 [archiso] Update nbd hook to match newer nbd operation mode.
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-10-12 01:33:04 -03:00
Gerardo Exequiel Pozzi
16422ba3b6 Do not copy host configuration to root-image
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2010-09-16 16:55:38 +02:00
Thomas Bächler
86ca33e76d Rename all occurrences of isolinux to syslinux
The name of the bootloader is syslinux, while isolinux is just one
of many components. isolinux.bin now also accepts syslinux.cfg
as a configuration file name (as do all other loaders).

Thus, rename the isolinux/ folder to syslinux/, and rename
isolinux.cfg to syslinux.cfg. The only occurrence of 'isolinux'
is now the actual loader file 'isolinux.bin'. This makes
the transition from isolinux to the other syslinux loaders
easier when remastering the ISO onto another medium.
2010-07-22 00:04:46 +02:00
Gerardo Exequiel Pozzi
7725dba216 [archiso_pxe_nbd] Remove unneeded umount commands
This step is now done at archiso hook (commit 1fc3a61b75)

Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2010-07-13 21:40:49 -03:00
Gerardo Exequiel Pozzi
6adf48d06b Call launch_interactive_shell in more cases of error.
A shell prompt is at least better than a kernel panic :)

Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2010-07-09 16:46:29 -03:00
Gerardo Exequiel Pozzi
1bbeeb0e5b Rename directories and parameteres to be more descriptive
* 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-09 16:14:55 -03:00
Gerardo Exequiel Pozzi
9154b02881 First mount ${archisodevice} before other mounts
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2010-07-09 15:36:51 -03:00
Gerardo Exequiel Pozzi
1fc3a61b75 archiso hook: umount /bootmnt if copytoram=y
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-08 03:44:43 -03:00
Gerardo Exequiel Pozzi
1d9d75beb4 Mount tmpfs filesystems with mode=0755
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2010-07-05 19:36:11 -03:00
Gerardo Exequiel Pozzi
1114731c28 [archiso] Rewrite cleanup step in mkarchiso
Currently works partially since in bash "*" is not expanded.
Old dirs removed, always empty dirs removed from list.
Also cleanup sync databases from pacman 3.4.0, avoiding problems with
pacman -Sy since "sync" directory is deleted.

Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2010-06-30 00:16:34 -03:00
Gerardo Exequiel Pozzi
6a0333c955 Improved testiso to allow differents scenarios
A quick & dirty changes to test iso withs differents combinations of
I={virtio,scsi,ide} x M={disk,cdrom}

Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2010-06-29 02:58:55 -03:00
Gerardo Exequiel Pozzi
f0aba9b876 Make it compatible with latest mkinitcpio.
Latest init script mounts a /dev FS, so /dev/loop0 will disappear.
Create loop0 on /lib/udev/devices so udev copy to /dev on startup.

Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2010-06-23 10:03:14 +02:00
Thomas Bächler
558eaafe9f Add optional command line parameter: archisobasedir
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-06-04 22:37:51 +02:00
Thomas Bächler
aeaec35905 archiso_pxe_nbd: Remove unnecessary/unsupported network modules
The archiso_pxe_nbd hook adds all network modules, including ones that
are not supported: The hook only supports ethernet devices, so there
is no need to add wireless, wimax, ppp, irda and plip modules.

Adding the wireless modules had an undesired side effect: The
wireless driver was loaded in the initramfs stage, where the
required crypto modules were unavailable. This caused the
initialization of the wireless devices to fail.

This patch removes all network modules except ethernet.
2010-05-16 11:29:15 +02:00
Thomas Bächler
e7d88f5237 archiso: Support booting from a virtio CD drive 2010-05-09 13:51:59 +02:00
Gerardo Exequiel Pozzi
a60a68eb88 [archiso] Add support to setups with more than one network card.
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-21 18:51:37 -03:00
Gerardo Exequiel Pozzi
a3ea9c18a9 [archiso] Fix install dir perms 644 -> 755 in Makefile
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2010-03-21 16:42:04 -03:00
Gerardo Exequiel Pozzi
7483cffb30 [archiso] Use a mount handler in archiso_pxe_nbd hook
* 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 12:03:59 -03:00
Gerardo Exequiel Pozzi
fffe690a73 [archiso] Rename nbd hook to archiso_nbd
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2010-03-18 01:01:13 -03:00
Gerardo Exequiel Pozzi
830555f71a [archiso] Add nbd hook, to make posible boot archiso from PXE via a NBD.
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-17 11:12:46 -03:00
Gerardo Exequiel Pozzi
fc9a01e713 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: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2010-03-16 01:53:40 -03:00
Gerardo Exequiel Pozzi
56750f37ed Revert back isohybrid offset to default setting.
This revert back the commit 991a5c69.
This causes more problems than solving (fixing the warning issue in parted)

With the default offset 0:
* makes posibble to create others extra partitions on USB key
  and use them inside the live enviroment.
* makes posible to use /dev/disk/by-label/ symlinks.
  archiso_early hook, can be removed.

Note: archboot also uses the default offset 0.

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

Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2010-03-16 00:02:47 -03:00
Gerardo Exequiel Pozzi
827f6a3f2b Fixed msg about copying images to RAM
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2010-03-15 23:58:55 -03:00
Gerardo Exequiel Pozzi
1e868e0114 Add missing archiso_early on uninstall procedure at Makefile
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2010-03-14 03:18:30 -03:00
Gerardo Exequiel Pozzi
4609c1c2d0 Add -p to blkid in hooks, to bypass the cache like in udev rules.
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2010-03-06 19:12:04 -03:00
Gerardo Exequiel Pozzi
4d37d70884 Split aufs mount command from _mnt_squashfs()
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-01 10:59:11 -03:00
Gerardo Exequiel Pozzi
c65f463ce3 Welcome back copytoram= option
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-03-01 10:39:01 -03:00
Gerardo Exequiel Pozzi
b7ca4bf281 Rename archiso-early hook to archiso_early
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-18 00:10:39 -03:00
Gerardo Exequiel Pozzi
be521f8658 Removed a non-working option: copytoram
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-17 19:24:27 -03:00
Gerardo Exequiel Pozzi
6462dc6e70 Fix coding style in archiso hook
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2010-02-17 19:23:27 -03:00
Gerardo Exequiel Pozzi
211f201644 Pass $newroot as part of the $mountpoint avoiding a global variable
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2010-02-17 19:09:00 -03:00
Gerardo Exequiel Pozzi
7d7dad06e2 Take advantage of module autoloading when mounting images as loop
* 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-17 19:07:14 -03:00
Gerardo Exequiel Pozzi
59d7a39994 Drop to recovery shell when mounting main media filesystem fails.
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2010-02-17 19:05:44 -03:00
Gerardo Exequiel Pozzi
b880be1ae9 Implement mount hook function in archiso hook.
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-16 16:59:18 -03:00
Gerardo Exequiel Pozzi
991a5c6972 Fixed offset of partition on iso
Split from commit 00dda7d4 from Svenstaro repo: changed -offset for mkarchiso
from default 0 to 1 so that the other partition on the usb device can
still be edited after dd'ing to it

Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2010-02-08 03:47:50 -03:00
Gerardo Exequiel Pozzi
5f0614b42f Remove special handling for vfat, all done via blkid
* 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-06 19:27:16 -06:00
Gerardo Exequiel Pozzi
1baefc75a6 Update archiso hooks to work with next mkinitcpio 0.6
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>
2010-02-06 19:27:16 -06:00
Gerardo Exequiel Pozzi
19af41afb4 Fix indentation of previus commit
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2009-12-04 15:02:44 -03:00
Gerardo Exequiel Pozzi
5f8999e3ea Abort mkarchiso if isolinux.cfg is not found.
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2009-12-02 02:35:26 -03:00
Gerardo Exequiel Pozzi
9350558f60 Removed unused gen_grubscan script and grub reference in mkarchiso
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2009-12-01 21:28:42 -03:00
Gerardo Exequiel Pozzi
ce454c4c72 Use 11 chars for fslabel for VFAT compatibility
Also use ARCH_YYYYMM format instead of random chars, removing pwgen dep.
Closing FS#14919.

Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-12-01 13:27:40 -08:00
Gerardo Exequiel Pozzi
2b9993073c Add an error message when mounting aufs fails, then exit 1
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-12-01 13:16:54 -08:00
Aaron Griffin
693f2ea0b8 More removal of old bootloader support
Only support syslinux now. Grub and other things can still
be managed manually by running mkisofs manually.

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-11-30 15:14:27 -08:00
Sven-Hendrik Haase
f77ddc0e9c Removed pwgen dependency 2009-11-30 15:14:09 -08:00
Sven-Hendrik Haase
ca52931e3a mkarchiso: cleaned up to use isohybrid only 2009-11-30 13:15:33 -08:00
Sven-Hendrik Haase
961d4cb670 mkarchiso: cleanup opts, user dir creation
As in title, this patch cleans up opt flags that exist for no reason and
adds additional flags to modify the disk meta info which would otherwise
be hardcoded.

I wasn't quite sure about the user directory part but it doesn't seem
like a good idea to put that part into the script and therefore I
commented it out. It would probably interfere with rc.local scripts that
take care of skel copying. I replaced the part after the TODO with a
safe guard to make sure that people who are not aware of the changes
will not be caught by surprise.

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-11-23 12:51:13 -08:00
Gerardo Exequiel Pozzi
ce2242da7e Silent modprobe loop loading in mkarchiso
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2009-11-19 03:37:29 -03:00
Gerardo Exequiel Pozzi
38d828f749 Only lock the optical drive if mounted from this
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-17 02:57:51 -03:00
Gerardo Exequiel Pozzi
ed97ef03a4 Rename ramdisk_size parameter to tmpfs_size to avoid conflict
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-11-17 00:48:26 -03:00
Gerardo Exequiel Pozzi
f32a5c5b20 Avoid force/rebuild of squashfs images if already updated.
Check if there are any modification of files/directories inside
the target directory for squashfs image.

Implements in some way this item in TODO:
* Add 'needsupdate' function to check if a squashfs image in the
  iso dir is up to date, if so, skip it; else rebuild it. No more
  need for the -f flag

Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2009-11-09 21:41:13 -03:00
Gerardo Exequiel Pozzi
3f1ee07d84 Support custom isomounts in archiso hook.
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-10-26 02:02:59 -03:00
Gerardo Exequiel Pozzi
7dd1aa150d Fix small typo in install/archiso for initcpio
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2009-10-21 03:22:39 -03:00
Gerardo Exequiel Pozzi
db1dde541c Fix how mkarchiso makes usb image
The current implementation in how partition is created for ext2 img
it looks a bit bad.

This patch makes the partition in more standarized way, respecting
cylinder alignement:
* The size of resulting image will be in cylinder multiple ~8MB.
* Use fdisk instead of sfdisk (sfdisk write some bad information)
* Make the result image in one pass, instead of concatenating.

Also the advantage is that with this can add another partitions
without any issues in the usb-flash-drive with this .img.

For example of current situation:

qemu-system-x86_64 -hda archlinux-avr.toolchain.img -serial stdio
---------------------------------------------------------------------
[root@avr ~]# fdisk /dev/sda

Command (m for help): p

Disk /dev/sda: 223 MB, 223974400 bytes
59 heads, 41 sectors/track, 180 cylinders
Units = cylinders of 2419 * 512 = 1238528 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1         181      218693+  83  Linux
Partition 1 has different physical/logical beginnings (non-Linux?):
     phys=(0, 1, 1) logical=(0, 1, 23)
Partition 1 has different physical/logical endings:
     phys=(27, 58, 41) logical=(180, 49, 21)

Command (m for help): v
Partition 1 has different physical/logical beginnings (non-Linux?):
     phys=(0, 1, 1) logical=(0, 1, 23)
Partition 1 has different physical/logical endings:
     phys=(27, 58, 41) logical=(180, 49, 21)
Partition 1: previous sectors 437449 disagrees with total 67731
62 unallocated 512-byte sectors

Command (m for help):
---------------------------------------------------------------------

qemu-system-x86_64 -hda archlinux-avr.toolchain-fix.img -serial stdio
---------------------------------------------------------------------
[root@avr ~]# fdisk /dev/sda

Command (m for help): p

Disk /dev/sda: 230 MB, 230307840 bytes
255 heads, 63 sectors/track, 28 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x5c94ca4f

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          28      224878+  83  Linux

Command (m for help): v
62 unallocated 512-byte sectors
---------------------------------------------------------------------

Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2009-10-21 00:46:39 -03:00
Gerhard Brauer
fd93e7c9bd Added vfat support to mount /dev/archiso
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-25 15:54:10 +02:00
Aaron Griffin
1dbbd6afcb Fix mount loop test for bindings
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-10 12:05:15 -07:00
Aaron Griffin
2aca746d58 Ensure bootmnt is bound properly into device root
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-08-10 12:03:25 -07:00
Gerhard Brauer
8d57752ced Use a label when generating the image and pass it to the commandline
This will generate a label ARCHISO_$randomstring using the pwgen
utility and add this label to the kernel command line.
A new label will be generated for each image, so it can be uniquely
identified.
Patch from brain0 <thomas@archlinux.org>

Signed-off-by: Gerhard Brauer <gerbra@archlinux.de>
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-07-27 11:03:38 -07:00
Gerhard Brauer
9794a6fb7c Use the archisolabel= command line option to mount the archiso device.
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-07-27 11:03:38 -07:00
Gerhard Brauer
73dc6b4b1b Enabled -C option in mkarchiso
This flag allows to specify a own pacman.conf using during mkarchiso.

Signed-off-by: Gerhard Brauer <gerbra@archlinux.de>
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-07-27 11:03:38 -07:00
Gerhard Brauer
d49b3da829 Fix mkisofs quiet parameter
Option syntax for quiet mode in mkisofs has changed

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-06-29 10:34:02 -07:00
Sven-Hendrik Haase
6be0f68611 Fix a typo in the archiso hook
remount,append=: should be remount,append:

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-06-12 07:28:57 -07:00
Sven-Hendrik Haase
da5452723e Updated deps, Makefile, TODO
Done to better reflect and indicate current progress.

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-06-08 14:32:06 -07:00
Aaron Griffin
71d8575fae Replace aufs 'add' with 'append'
Change via AUR package

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-06-08 12:36:28 -07:00
Aaron Griffin
91fb1fef4f Missed aufs module in mkinitcpio install script
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-04-17 09:19:15 -07:00
Aaron Griffin
8d10415b04 Replace unionfs with aufs
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-04-14 14:38:11 -05:00
Aaron Griffin
b3d8310dcb Fix a typo in the archiso-early hook
Wrong slash! No idea how that happened :)

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-01-30 10:50:43 -08:00
Aaron Griffin
f852276274 Increment usbdelay by 1 before sleeping
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-29 09:08:36 -08:00
Loui Chang
7a98a216de Fix typos, formatting, and vague language where possible.
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-26 22:10:09 -06:00
Aaron Griffin
8a37489379 Advanced USB delay handling
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-24 20:17:54 -06:00
Aaron Griffin
c6bb213064 Single quotes around find patterns during cleanup
Whoops, *.img expands if we're building USB images.

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-01-24 17:43:21 -06:00
Aaron Griffin
2f108b208b Add a manual sleep and rootdelay
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>
2009-01-24 16:21:30 -06:00
Øyvind Heggstad
5b3370facd Makefile fixes for 'install' target
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-01-22 14:04:43 -06:00
Aaron Griffin
4dc9b68e4d Remove a stray '_mksquash' echo
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-12-24 10:45:05 -08:00
Aaron Griffin
fbd2ce5cb0 Fix usb image's size detection
Conversion issue when dropping mkusbimg. Use work_dir/iso
to get the proper image size

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-12-24 10:33:36 -08:00
Aaron Griffin
571aa15309 Fix the way squashfs mountpoints are handled
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-23 20:12:20 -08:00
Gerhard Brauer
f7d183588c Fix the last "device exists check"
Looks like my last-minute addition was goofed.
Use && not ||

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-12-23 07:36:54 -08:00
Aaron Griffin
32a1991679 Properly remove the usb image's tmpdir
Guess what? rm -f won't remove a dir. Whoops

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-12-23 00:33:46 -08:00
Aaron Griffin
f47fde8485 Fix some intending errors in USB creation
This was causing sfdisk and grub to balk

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-12-23 02:23:22 -06:00
Aaron Griffin
29f5c0373c Add existence checks to the boot-media scan
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-23 02:17:59 -06:00
Aaron Griffin
2a58a09f8c README and isomounts additions on creation
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-12-23 00:52:18 -06:00
Aaron Griffin
f1c46e0d3f Cleanup archiso hook
Fix squashfs mounting of all isomounts images, along
with a few other changes

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-12-23 00:51:20 -06:00
Aaron Griffin
978fdafbff Allow specifying of pacman.conf file in mkarchiso
Use the -C flag to allow us to build alternate isos on
a different architecture and things of the sort

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-12-21 02:24:39 -06:00
Aaron Griffin
97f4dcec81 Re-add the if-check that includes grub-gfx
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-12-19 23:30:53 -06:00
Aaron Griffin
485838e9a9 Remove host system package checks
Not needed as we ensure files are in the ISO dir

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-12-19 23:26:45 -06:00
Aaron Griffin
a3fc771d90 Add bootloader requirements to the README
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-12-19 23:24:18 -06:00
Aaron Griffin
43191485ed Remove mkusbimg from the install Makefile
Merged into mkarchiso now

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-12-18 22:13:24 -06:00
Aaron Griffin
4e638eaf24 Final changes for new nextgen scripts
Too much to list. Just look at the diff 8)

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-12-18 22:09:19 -06:00
Aaron Griffin
fe517fb0fc Fix isolinux support (pkgname)
Package name is 'syslinux'

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-12-18 22:09:18 -06:00
Aaron Griffin
f918440da1 Rework the commands, create and iso
Initial changes to get 'create' working as intended.

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-12-18 22:09:17 -06:00
Aaron Griffin
901526970e Change mounts file to isomounts
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-18 22:09:17 -06:00
Aaron Griffin
88ae858f51 Support mutli-arch disks by specifying the arch
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-12-18 22:09:17 -06:00
Aaron Griffin
70bc4b6863 Modprobe loop module before use in mkusbimg
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-11-24 19:15:22 -08:00
Simo Leone
0a8b401685 Update archiso hook to match root image naming
It's called root-image.sqfs rather than
archiso.sqfs nowadays.

Signed-off-by: Simo Leone <simo@archlinux.org>
2008-11-13 03:51:12 -06:00
Simo Leone
460b0f1edc Fix loop device mounting
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>
2008-11-13 03:49:25 -06:00
Simo Leone
7f1a141136 Fix CD-ROM mounting
klibc-udev hasn't created cdrom symlinks in a while,
we have to look through kernel names ourselves.

Signed-off-by: Simo Leone <simo@archlinux.org>
2008-11-13 03:47:58 -06:00
Aaron Griffin
dee0d28205 Fail to a shell if boot device not found
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-10-30 02:07:06 -05:00
Aaron Griffin
ee900303ae Move grub/isolinux stuff to Makefile level
Again, in an attempt to make this feel cleaner, I've moved
more out to the makefile level. Not sure I'm happy with that
but it works for now

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-10-25 01:32:12 -05:00
Aaron Griffin
142c257323 Fix archiso hook to deal with new udev
udetrigger and udevsettle replaced by udevadm

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-10-25 01:31:37 -05:00
Aaron Griffin
071b3454a0 Rework image creation
Allow for grub, grub-gfx, or isolinux support
(isolinux support still pending, skeleton is in place)

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-10-20 23:41:05 -05:00
Aaron Griffin
c8df7387dd Trim spaces from the package list before using
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-10-20 23:40:43 -05:00
Aaron Griffin
d8f4565b89 Minor modifications to usage output
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-10-20 23:40:17 -05:00
Aaron Griffin
3f5c116d8c Enable mkinitcpio hook to use the 'mounts' file
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-10-20 23:39:43 -05:00
Aaron Griffin
2b6515271d Remove mkinitcpio functionality
We don't want to tie the archiso scripts to the way the ISO
should boot the live system. This can and should be done at
the build (Makefile) level beforehand

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-10-19 23:31:50 -05:00
Aaron Griffin
f3110a21eb Move mountfile copying code
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-10-19 23:18:16 -05:00
Aaron Griffin
eb6693901d Rename 'img' command to 'image'
Additionally, remove the "all" command

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-10-19 23:08:34 -05:00
Aaron Griffin
bba27fbe4a Default IMG_TYPE to 'iso'
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-10-19 23:06:35 -05:00
Aaron Griffin
b4d60a7ccb Fail install if no packages specified
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-10-19 22:40:36 -05:00
Aaron Griffin
61d0a83113 Code cleanup: usage and comments
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-10-19 22:40:06 -05:00
Aaron Griffin
6989ceb442 Minor documentation updates
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-10-19 22:39:35 -05:00
Aaron Griffin
e7a7902104 Add some config output on calling mkarchiso
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-10-19 19:57:09 -05:00
Aaron Griffin
00848934b6 Remove all 'package file' usage in favor of command line packages
This is just simpler and more intuitive. Shell tools can easily
be used to install from a file. For instance:
   $ mkarciso ... -p "$(cat package-file)"

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-10-19 19:51:48 -05:00
Aaron Griffin
c2ffda39f9 Rename all uses of 'archlive' to 'archiso'
Additionally change grub prompts to use "ArchLinux LiveCD"
as the boot item name

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-10-19 15:49:55 -05:00
Aaron Griffin
f3c061b541 Capitalize "global" variables IMGROOT and INSTROOT
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-09-13 23:20:47 -05:00
Aaron Griffin
b7d7a9fcdf Refactor commands out into functions (for the future)
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-09-13 23:18:10 -05:00
Aaron Griffin
781b520dbf Makefile cleanup
Use -D flag for install binary instead of mkdir
Remove old boot-{cd,usb} hooks

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-09-06 22:11:41 -05:00
Aaron Griffin
0d3f3f0183 Make gen_grubscan executable
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-09-06 22:09:57 -05:00
Aaron Griffin
9417199206 Unify initcpio hooks to one glorious archiso hook
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-09-06 21:06:39 -05:00
Aaron Griffin
98318ea039 Rename "default-config" to "overlay"
I like difficulty and then name was annoying me

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-09-06 20:45:45 -05:00
Aaron Griffin
8966351b12 Split mkarchiso and configs into logical parts
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-09-06 20:39:35 -05:00