Commit Graph

221 Commits

Author SHA1 Message Date
Gerardo Exequiel Pozzi
cd359bc37a [archiso] Checksum only aitab and *.sfs (per architecture)
We are currently checksuming all files inside $archisobasedir
(aitab, *sfs, kernel/initramfs and boot/syslinux related files)
this is stored in one file only. Its works good for now,
but I think we only need to checksum only aitab and *.sfs if they are needed.
Currently if you boot a dual-iso in i686, also checksum is done
for *.sfs of x86_64. Not a big issue, this just take a bit more time.
The real issue is when booting via PXE with HTTP/FTP methods,
since they download only aitab and needed *.sfs files,
can not use directly the only one file where checksums are stored.

This patch does:

(1) Do not checksum syslinux related files, anyway you are already reach initramfs stage.
(2) Do not checksum kernel/initramfs files, for the same as (1)
(3) Two checksum.${arch}.md5 for each i686 and x86_64 for only aitab and *.sfs.

Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2011-11-28 12:28:03 -03:00
Gerardo Exequiel Pozzi
8bd067461d [archiso] Add DNS resolver support to archiso_pxe_common
[ramfs /]# cat /etc/resolv.conf
nameserver 192.168.0.77
[ramfs /]# curl -O http://releng.archlinux.org/pxeboot/README
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1129  100  1129    0     0   2191      0 --:--:-- --:--:-- --:--:--  4589
[ramfs /]#

Do not "add_binary /lib/libnss_dns.so.2", because will add libnss_dns-VERSION.so.2 as libnss_dns.so.2
Is not an issue will work (nobody links directly to VERSION), but is not nice.

Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2011-11-28 12:28:03 -03:00
Gerardo Exequiel Pozzi
76dea1654e [archiso] Add PXE NFS support
It add support for using *.sfs images via NFS.

It must be located after archiso_pxe_nbd in mkinitcpio.conf, in that way
NBD is the default.

New boot parameters:

    archiso_nfs_srv=IP:/path
         Set the NFS IP and path. Accepts ${pxeserver} as IP.

    archiso_nfs_opt= Sets NFS mount opts (comma separated)
                    Defaults to:
                      port            = as given by server portmap daemon
                      rsize           = 1024
                      wsize           = 1024
                      timeo           = 7
                      retrans         = 3
                      acregmin        = 3
                      acregmax        = 60
                      acdirmin        = 30
                      acdirmax        = 60
                      flags           = hard, nointr, noposix, cto, ac

:: Running Hook [archiso_pxe_common]
IP-Config: eth0 hardware address 52:54:00:12:34:57 mtu 1500
IP-Config: eth0 guessed broadcast address 192.168.0.255
IP-Config: eth0 guessed nameserver address 192.168.0.218
IP-Config: eth0 complete (from 192.168.0.218):
 address: 192.168.0.90     broadcast: 192.168.0.255    netmask: 255.255.255.0
 gateway: 192.168.0.218    dns0     : 192.168.0.218    dns1   : 0.0.0.0
 rootserver: 192.168.0.218 rootpath:
 filename  :
:: Running Hook [archiso_pxe_nbd]
:: Running Hook [archiso_pxe_curl]
:: Running Hook [archiso_pxe_nfs]
:: Mounting '192.168.0.77:/mnt/iso'

...
192.168.0.77:/mnt/iso/ on /run/archiso/bootmnt type nfs (rw,relatime,vers=3,rsize=524288,wsize=524288,namlen=255,hard,nolock,proto=tcp,port=65535,timeo=7,retrans=3,sec=sys,local_lock=all,addr=192.168.0.77)
...

My /etc/exports
/mnt/iso 192.168.0.90(ro,no_subtree_check,no_root_squash)
2011-11-28 12:28:03 -03:00
Gerardo Exequiel Pozzi
8eb4c624dc [archiso] Add archiso_pxe_curl hook
Its add support for downloading the ISO image via HTTP/FTP with curl or download *.sfs files.
The files are downloaded on /run/archiso/curlspace (tmpfs) and setup a loop dev from it
(like in archiso_loop_mnt) in the ISO case, or just do a bind mount to
/run/archiso/bootmnt in the other case.

This hook must be located after archiso_pxe_nbd in mkinitcpio.conf, in that way
NBD is the default.

New bootparm:
* archiso_curl_url=(first form)
    archiso_curl_url=http://192.168.0.7/archlinux/iso/archlinux.iso (absolute form)
        Use an absolute URL. Fetch the entire ISO
    archiso_curl_url=ftp://${pxeserver}/archlinux/iso/archlinux.iso (relative form)
        Use the as IP the same server where PXE reside.  Fetch the entire ISO

* archiso_curl_url=(second form)
    archiso_curl_url=http://192.168.0.7/archlinux/iso/unpacked (absolute form)
        Use an absolute URL. Where unpacked (an example name) is a directory where
        ${archisobasedir} ("arch" by default) is located with all *.sfs.
        This fetch only needed files.
    archiso_curl_url=ftp://${pxeserver}/archlinux/iso/unpacked (relative form)
        Use the as IP the same server where PXE reside. Where unpacked (an example name)
        is a directory where ${archisobasedir} ("arch" by default)
        is located with all *.sfs. This fetch only needed files.

* curlspace_size= Set a size for a tmpfs filesystem where files are downloaded.

Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2011-11-28 12:28:03 -03:00
Gerardo Exequiel Pozzi
1edaf15cef [archiso] Split archiso_pxe_nbd in two hooks.
One hook only setup the network device (archiso_pxe_common) the other
setup the NBD client (archiso_pxe_nbd).

New bootparam:
    archiso_pxe_srv=IP
        Allow to set an IP different from the PXE server.

Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2011-11-28 12:28:03 -03:00
Gerardo Exequiel Pozzi
334db092b5 [archiso] Check if /run/archiso/bootmnt is a mountpoint.
In this way allow to mount /run/archiso/bootmnt from another hook,
but still use the logic from the main mount_hook, skipping only this mount.

Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2011-11-28 10:35:05 -03:00
Gerardo Exequiel Pozzi
f097724080 [archiso] Only accepts aitab inside
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2011-11-28 10:35:05 -03:00
Gerardo Exequiel Pozzi
e03ed816e0 [archiso] Use different logic when archisodevice == cow_device
* Now bootmnt/img_dev is always a ro-mount,
  and cowspace is first ro-mount then rw-mount.

* Fix a "hidden" bug: at the time of test [[ -ef ]], if devices nodes
  are not ready, such test will fail then archisodevice will mounted ro and
  when cow_device is mounted to be rw it fails.
  (I recently suffered this on a machine with slow USB)

Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2011-11-28 10:35:05 -03:00
Gerardo Exequiel Pozzi
e135003c13 [archiso] simplify _mnt_dev() (mount is now from util-linux)
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2011-11-28 10:35:05 -03:00
Gerardo Exequiel Pozzi
baf0ae0013 [archiso] Do not bind mount on /bootmnt
Boot media is already available in /run/archiso/bootmnt
if no copytoram is used.

Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2011-11-16 23:18:41 -03:00
Gerardo Exequiel Pozzi
da813e5b9d [hooks/archiso_pxe_nbd] Refactor, remove sed usage.
* ipconfig cmd writes a file in /tmp that is ready for direct evaluation.
We can use this instead of parsing the output, to do this some variable
renames are needed.

Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2011-11-16 16:37:04 -03:00
Gerardo Exequiel Pozzi
7ab83b8571 [hooks/archiso_pxe_nbd] Remove grep usage
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2011-11-15 19:37:10 -03:00
Gerardo Exequiel Pozzi
469b5b2c58 [archiso] install hook cleanups
* Remove IDE stuff.
* Remove modules that can be added via relevant hooks.
* Replace sata with virtio in baseline profile.

Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2011-11-05 21:03:35 -03:00
Gerardo Exequiel Pozzi
59ad1113d9 [archiso] Add archiso_shutdown hook.
STATUS: Working (std boot, loop_mnt, pxe) with copytoram=[y|n].

NEEDS: initscript > 2011.07.3, mkinitcpio > 0.7.2, mkinitcpio-busybox > 1.18.5-1

Purpose: we need this for propertly unmount $cow_device,
used for persistent dm-snapshot devices.

This hook is based on work from Tom Gundersen[#1],
but adapted for archiso things (specially the shutdown script)

[#1] http://mailman.archlinux.org/pipermail/arch-projects/2011-July/001549.html
[#2] http://projects.archlinux.org/initscripts.git/commit/?id=1fa7b4b453e96533ae1db3630031285e5fc302b3
[#3] http://mailman.archlinux.org/pipermail/arch-projects/2011-August/001749.html

Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2011-10-23 21:24:18 -03:00
Gerardo Exequiel Pozzi
908551ef02 [archiso] Add support for img_label= and allow img_dev same as cow_dev
* Support img_label=
* Allow use img_dev= as cow_device=
* Use new function _mnt_dev() from archiso.
* Check for error while setting loopback device.

Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2011-10-23 21:24:17 -03:00
Gerardo Exequiel Pozzi
90fb8ea480 [archiso] Mount all fs on /run/archiso instead of /
This allow to take control again of these mountpoints outside initramfs.
(i.e: on deinitramfs stage at shutdown for unmount it)

Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2011-10-23 21:24:17 -03:00
Gerardo Exequiel Pozzi
e2055835fd [archiso] Allow persistent cow dm-snapshots.
Add some options to control where all COW files will be located.
Until this moment all files are located in a tmpfs filesystem.
Now is posible to set a device via a filesystem label or device node
plus a directory, where all these files will be stored.
All dm-snapshot devices will be persistent by default,
but this can be changed if wanted.

Take care, a filesystem that does not support sparse files maybe
is not the best choice for COW files, because they are created with
the same size (is apparent) like the read-only device (the image.fs inside .sfs).
Of course sooner or later, depending on use, these files actually end up
being as big as the read-only device.

KNOW-ISSUE: On shutdown in step "Unmounting Filesystems" will [FAIL],
    all filesystem except $cow_device, will be unmounted/remounted-ro.
    For this reason this change needs an archiso_shutdown hook, thats
    unmount all block devices used by archiso. (Work in progress)

Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2011-10-23 21:24:17 -03:00
Gerardo Exequiel Pozzi
91e11c30f4 [archiso] Add a new function _mnt_dev(), use it for mounting archisodevice.
Separate this code from main mount hook, and make it more generic.

_mnt_dev(device, mountpoint, flags) ->
    wait for device and mount, launch a shell if something goes wrong.

Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2011-10-23 21:24:17 -03:00
Gerardo Exequiel Pozzi
51db47e74b [archiso] disable progress bar in mksquashfs
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2011-10-14 22:46:45 -03:00
Gerardo Exequiel Pozzi
bfef0bc1eb [archiso] Unify ->
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2011-10-12 14:40:19 -03:00
Gerardo Exequiel Pozzi
1dcf439c30 [archiso] Create /etc/mtab as symlink.
This is now supported since util-linux pkg enable it.

Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2011-10-03 21:12:56 -03:00
Gerardo Exequiel Pozzi
8ea61d2b28 [archiso] Cleanup archiso install hook.
* These files was added during developement stage of dm-snapshot branch
  of archiso. Never was used, sinse archiso works directly with dmsetup
  and with device nodes in /dev/mapper/

* Added 11-dm-initramfs.rules to keep dm info about nodes persistent
  in udev db across initramfs/real-root.

Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2011-08-30 23:21:11 -03:00
Gerardo Exequiel Pozzi
a55fc14e24 [archiso] Integrate omit_kill_nbd_client logic in hook.
This makes archiso_pxe_nbd functionallity full-independient from
archiso profiles (configs/*).

Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2011-08-29 17:03:00 -03:00
Gerardo Exequiel Pozzi
14743f4202 [archiso] Switch from cdrkit to libisoburn
* Preparing terrain for UEFI support.
* Also make isohybrid hack in one step.
* Removed UDF layer, since xorriso does not support it.
* Removed unsupported options by xorriso (-uid/-gid/-allow-limited-size)
* Removed option already default in xorriso (-input-charset utf-8)

Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2011-08-29 01:47:57 -03:00
Gerardo Exequiel Pozzi
ad2385c082 [archiso] Use -w <work_dir> instead of cmd <work>, add -o <out_dir>
Default (if not specified) -w work -o out.

-o <out_dir> is only used by 'iso' command.

Adjust build.sh of releng and baseline profile to reflect this change.

<project>
  - work <- $work_dir
  - out  <- $out_dir

Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2011-08-29 01:45:49 -03:00
Gerardo Exequiel Pozzi
8c995ee657 [archiso] Change location of nbd_client.pid
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2011-08-28 04:07:04 -03:00
Gerardo Exequiel Pozzi
219b43a0bf [archiso] Load module loop in run_hook()
Otherwise archiso_loop_mnt will fail.

Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2011-08-26 20:12:22 -03:00
Gerardo Exequiel Pozzi
23e1cd01cd [archiso] Avoid regenerate checksum -> .iso.
Also put _is_directory_changed() inside 'if' avoiding premature execution if it returns non-zero.

Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2011-08-26 19:23:25 -03:00
Gerardo Exequiel Pozzi
ee5e372c6e [archiso] Add missing 'rm' some files on uninstall
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2011-08-24 00:10:32 -03:00
Gerardo Exequiel Pozzi
c2aefad9b2 [archiso] Makefile trivial fix (if configs/ already on DESTDIR)
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2011-08-15 01:07:31 -03:00
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