index : mkinitcpio-archiso32 | |
Archlinux32 initcpio scripts used by archiso | gitolite user |
summaryrefslogtreecommitdiff |
author | Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> | 2012-01-05 17:58:12 -0300 |
---|---|---|
committer | Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> | 2012-01-05 17:58:12 -0300 |
commit | 0cee1b956b2e64cca0f85bf5e3ca85916498365a (patch) | |
tree | 0b809279dece94ffa1c70254c0861a054c39c299 /archiso/hooks | |
parent | 09b9d2b060dd8f8651e799013e1897c6e041eaac (diff) |
-rw-r--r-- | archiso/hooks/archiso | 17 |
diff --git a/archiso/hooks/archiso b/archiso/hooks/archiso index 202325f..7012343 100644 --- a/archiso/hooks/archiso +++ b/archiso/hooks/archiso @@ -22,16 +22,17 @@ _make_loop_dev() { echo /dev/loop${loop_dev_count} } -# args: source, mountpoint +# args: source, newroot, mountpoint _mnt_fs() { local img="${1}" - local mnt="${2}" + local newroot="${2}" + local mnt="${3}" local img_fullname="${img##*/}"; local img_name="${img_fullname%%.*}" local dm_snap_name="${dm_snap_prefix}_${img_name}" local ro_dev ro_dev_size ro_dev_fs_type rw_dev - mkdir -p "${mnt}" + mkdir -p "${newroot}${mnt}" _next_loop_dev ro_dev=$(_make_loop_dev "${img}") @@ -60,10 +61,12 @@ _mnt_fs() { echo "0 ${ro_dev_size} snapshot ${ro_dev} ${rw_dev} ${cow_persistent} 8" | dmsetup create ${dm_snap_name} - msg ":: Mounting '/dev/mapper/${dm_snap_name}' (${ro_dev_fs_type}) to '${mnt}'" - if ! mount -t "${ro_dev_fs_type}" "/dev/mapper/${dm_snap_name}" "${mnt}" ; then - echo "ERROR: while mounting '/dev/mapper/${dm_snap_name}' to '${mnt}'" + msg ":: Mounting '/dev/mapper/${dm_snap_name}' (${ro_dev_fs_type}) to '${newroot}${mnt}'" + if ! mount -t "${ro_dev_fs_type}" "/dev/mapper/${dm_snap_name}" "${newroot}${mnt}" ; then + echo "ERROR: while mounting '/dev/mapper/${dm_snap_name}' to '${newroot}${mnt}'" launch_interactive_shell + else + echo "/dev/mapper/${dm_snap_name} ${mnt} auto defaults 0 0" >> ${newroot}/etc/fstab fi } @@ -214,7 +217,7 @@ archiso_mount_handler() { [[ "${aitab_arch}" != "any" && "${aitab_arch}" != "${arch}" ]] && continue if [[ "${aitab_fs_type}" != "none" ]]; then _mnt_sfs "/run/archiso/bootmnt/${archisobasedir}/${aitab_arch}/${aitab_img}.fs.sfs" "/run/archiso/sfs/${aitab_img}" - _mnt_fs "/run/archiso/sfs/${aitab_img}/${aitab_img}.fs" "${newroot}${aitab_mnt}" + _mnt_fs "/run/archiso/sfs/${aitab_img}/${aitab_img}.fs" "${newroot}" "${aitab_mnt}" else _mnt_sfs "/run/archiso/bootmnt/${archisobasedir}/${aitab_arch}/${aitab_img}.sfs" "${newroot}${aitab_mnt}" fi |