2009/11/5 Michal Suchanek <hramr...@centrum.cz>: > 2009/11/4 Michal Suchanek <hramr...@centrum.cz>: >> And a patch that resolves the issue. >> >> Applies on top of the iso/iscsi patches. >> > > This one applies over iso boot patch only. >
And rebased patch for booting iso over http.
diff --git a/scripts/live b/scripts/live index 09e7b2f..fb714f6 100755 --- a/scripts/live +++ b/scripts/live @@ -8,6 +8,7 @@ echo "/root/lib" >> /etc/ld.so.conf echo "/root/usr/lib" >> /etc/ld.so.conf mountpoint="/live/image" +ext_mountpoint="/ext_volume" LIVE_MEDIA_PATH="live" root_persistence="live-rw" @@ -820,19 +821,25 @@ do_netmount () do_httpmount () { rc=1 - dest="${mountpoint}/${LIVE_MEDIA_PATH}" - mount -t ramfs ram "${mountpoint}" - mkdir -p "${dest}" for webfile in HTTPFS FTPFS FETCH do - url="$(eval echo \"\$\{${webfile}\}\")" - extension="$(echo "${url}" | sed 's/\(.*\)\.\(.*\)/\2/')" + local url="$(eval echo \"\$\{${webfile}\}\")" + local extension="$(echo "${url}" | sed 's/\(.*\)\.\(.*\)/\2/')" if [ -n "$url" ] then case "${extension}" in - squashfs|tgz|tar) + iso|squashfs|tgz|tar) + if [ "${extension}" = "iso" ] + then + mkdir -p "${ext_mountpoint}" + dest="${ext_mountpoint}" + else + local dest="${mountpoint}/${LIVE_MEDIA_PATH}" + mount -t ramfs ram "${mountpoint}" + mkdir -p "${dest}" + fi if [ "${webfile}" = "FETCH" ] then case "$url" in @@ -863,6 +870,12 @@ do_httpmount () fi [ ${?} -eq 0 ] && rc=0 [ "${extension}" = "tgz" ] && live_dest="ram" + if [ "${extension}" = "iso" ] + then + isoloop=$(setup_loop "${dest}/$(basename "${url}")" "loop" "/sys/block/loop*" "" '') + mount -t iso9660 "${isoloop}" "${mountpoint}" + rc=${?} + fi break ;; @@ -875,7 +888,12 @@ do_httpmount () if [ ${rc} != 0 ] then - umount "${mountpoint}" + if [ -d "${ext_mountpoint}" ] + then + umount "${ext_mountpoint}" + rmdir "${ext_mountpoint}" + fi + umount "${mountpoint}" fi return ${rc} diff --git a/scripts/live-bottom/05mountpoints b/scripts/live-bottom/05mountpoints index ce151e1..f1d0b83 100755 --- a/scripts/live-bottom/05mountpoints +++ b/scripts/live-bottom/05mountpoints @@ -33,4 +33,10 @@ then mount --move /live/image /root/live/image fi +if [ -d /ext_volume ] +then + mkdir -p /root/live/ext_volume + mount --move /ext_volume /root/live/ext_volume +fi + log_end_msg