Linux Mint 13: Grub2 ISO Loopback Not Working?

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
User avatar
darethehair
Level 4
Level 4
Posts: 239
Joined: Sun Mar 08, 2009 2:22 pm
Location: Morden Manitoba Canada
Contact:

Re: Linux Mint 13: Grub2 ISO Loopback Not Working?

Post by darethehair »

breaker wrote:I have some more notes about this. I did some testing booting these things. The 32bit also fails when it is unpacked from the ISO and called with GRUB2. Syslinux works fine (Unetbootin uses Syslinux). I think there is something about the way GRUB loads the 32 bit linux kernel that causes the problem. It seemed to fail on slightly older versions of GRUB as well as 1.99.
Good work sleuthing! What do you recommend for next steps? Interested in taking what you/we have learned and making an official 'bug fix request' out of it?

EDIT: Did a bit of digging myself, and it does the NTFS failure thing on this line in the '20iso_scan' script, but you did mention that this may be a red herring, since successful boots (64bit?) work OK:

Code: Select all

    if find_path "${iso_path}" /isodevice rw; then
There is nothing more dangerous than a bored cat.
breaker

Re: Linux Mint 13: Grub2 ISO Loopback Not Working?

Post by breaker »

I need to make more logs because mine got disorganized. Perhaps I could submit a bug report, if I can isolate the root cause somewhat. Hypothesis, the 32bit linux kernel when loaded by GRUB2 causes the scripts in initrd to fail to find the squashfs for some reason (presumably can't find and mount ISO file to create it's own loopback to take over booting). However, GRUB2 fails to boot the same system even when extracted to a directory, and a similar error occurs (this time complains about sr0). I tried all kinds of boot options, noapic, etc. So far no good. A similar error is encountered when people attempt to use mint4win from the 32bit ISO.

Things to try;

see if Ubuntu 12.04 32bit works with a loop and iso-scan (if so, what is different, are the kernels built the same?)
Will it work if the USB flash is ext2 formatted instead?
check structure of 32bit iso vs 64bit iso, are they both the new hybrid isos?
respin iso with different kernel (older or newer).
boot the system again with Syslinux, this time getting better logs. It does appear to mount /cdrom and not /isodevice ?
compare more carefully a successful casper.log from 64bit and from a Syslinux boot.

Here is a LM13 64bit MATE ISO loopback GRUB2 boot casper.log;

Code: Select all

+ tailpid=363
+ parse_cmdline
+ tail -f casper.log
+ cat /proc/cmdline
+ [  =  ]
+ export UNIONFS=DEFAULT
+ set_usplash_timeout
+ [ -x /sbin/usplash_write ]
+ start_usplash_pulse
+ [ -x /sbin/usplash_write ]
+ [ n != y ]
+ log_begin_msg Running /scripts/casper-premount
+ _log_msg Begin: Running /scripts/casper-premount ... 
+ [ n = y ]
+ printf Begin: Running /scripts/casper-premount ... 
Begin: Running /scripts/casper-premount ... + run_scripts /scripts/casper-premount
+ initdir=/scripts/casper-premount
+ [ ! -d /scripts/casper-premount ]
+ [ -f /scripts/casper-premount/ORDER ]
+ . /scripts/casper-premount/ORDER
+ /scripts/casper-premount/10driver_updates
done.
+ [ -e /conf/param.conf ]
+ /scripts/casper-premount/20iso_scan
Begin: ...waiting for devs... ... done.
+ [ -e /conf/param.conf ]
+ . /conf/param.conf
+ LIVEMEDIA=/isodevice/linuxmint-13-mate-dvd-64bit.iso
+ LIVEMEDIA_OFFSET=0
+ /scripts/casper-premount/30custom_installation
+ [ -e /conf/param.conf ]
+ . /conf/param.conf
+ LIVEMEDIA=/isodevice/linuxmint-13-mate-dvd-64bit.iso
+ LIVEMEDIA_OFFSET=0
+ [ n != y ]
+ log_end_msg
+ _log_msg done.\n
+ [ n = y ]
+ printf done.\n
done.
+ set_usplash_timeout
+ [ -x /sbin/usplash_write ]
+ [ ! -z  ]
+ i=0
+ [ 0 -lt 60 ]
+ find_livefs 0
+ timeout=0
+ [ ! -z /isodevice/linuxmint-13-mate-dvd-64bit.iso ]
+ check_dev null /isodevice/linuxmint-13-mate-dvd-64bit.iso skip_uuid_check
+ sysdev=null
+ devname=/isodevice/linuxmint-13-mate-dvd-64bit.iso
+ skip_uuid_check=skip_uuid_check
+ [ -z /isodevice/linuxmint-13-mate-dvd-64bit.iso ]
+ [ -d /isodevice/linuxmint-13-mate-dvd-64bit.iso ]
+ [ -e /isodevice/linuxmint-13-mate-dvd-64bit.iso ]
+ [ -n 0 ]
+ setup_loop /isodevice/linuxmint-13-mate-dvd-64bit.iso loop /sys/block/loop* 0
+ local fspath=/isodevice/linuxmint-13-mate-dvd-64bit.iso
+ local module=loop
+ local pattern=/sys/block/loop*
+ local offset=0
+ modprobe -q -b loop
+ /sbin/udevadm settle
+ [ loop = loop ]
+ [ ! -e /dev/loop0 ]
+ losetup -f
+ dev=/dev/loop0
+ [ /dev/loop0 ]
+ [ -n 0 ]
+ losetup -o 0 /dev/loop0 /isodevice/linuxmint-13-mate-dvd-64bit.iso
+ echo /dev/loop0
+ return 0
+ loopdevname=/dev/loop0
+ devname=/dev/loop0
+ get_fstype /dev/loop0
+ local FSTYPE
+ local FSSIZE
+ fstype
+ eval FSTYPE=iso9660 FSSIZE=0
+ FSTYPE=iso9660 FSSIZE=0
+ [ iso9660 != unknown ]
+ echo iso9660
+ return 0
+ fstype=iso9660
+ is_supported_fs iso9660
+ fstype=iso9660
+ return 0
+ blkid -o value -s UUID /dev/loop0
+ devuid=
+ [ -n  ]
+ mount -t iso9660 -o ro,noatime /dev/loop0 /cdrom
+ [ -n  ]
+ is_casper_path /cdrom
+ path=/cdrom
+ [ -d /cdrom/casper ]
+ echo /cdrom/casper/filesystem.squashfs
+ [ /cdrom/casper/filesystem.squashfs != /cdrom/casper/*.squashfs ]
+ return 0
+ [ skip_uuid_check ]
+ echo /cdrom
+ return 0
+ return 0
+ livefs_root=/cdrom
+ [ /cdrom ]
+ break
+ [ -z /cdrom ]
+ [  ]
+ [  ]
+ [  ]
+ mount_images_in_directory /cdrom /root
+ directory=/cdrom
+ rootmnt=/root
+ match_files_in_dir /cdrom/casper/*.squashfs
+ local pattern=/cdrom/casper/*.squashfs
+ echo /cdrom/casper/filesystem.squashfs
+ [ /cdrom/casper/filesystem.squashfs != /cdrom/casper/*.squashfs ]
+ return 0
+ setup_unionfs /cdrom/casper /root
+ image_directory=/cdrom/casper
+ rootmnt=/root
+ [ DEFAULT = DEFAULT ]
+ modprobe -q -b overlayfs
+ cut -f2 /proc/filesystems
+ grep -q ^overlayfs$
+ UNIONFS=overlayfs
+ break
+ [ overlayfs = DEFAULT -a -x /bin/unionfs-fuse ]
+ [ overlayfs = DEFAULT ]
+ croot=/
+ rofsstring=
+ rofslist=
+ [ overlayfs = aufs ]
+ [ overlayfs = unionfs-fuse ]
+ roopt=ro
+ mkdir -p /
+ basename /cdrom/casper/*.ext2
+ imagename=*.ext2
+ [ -d /cdrom/casper/*.ext2 ]
+ [ -f /cdrom/casper/*.ext2 ]
+ basename /cdrom/casper/filesystem.squashfs
+ imagename=filesystem.squashfs
+ [ -d /cdrom/casper/filesystem.squashfs ]
+ [ -f /cdrom/casper/filesystem.squashfs ]
+ get_backing_device /cdrom/casper/filesystem.squashfs
+ setup_loop /cdrom/casper/filesystem.squashfs loop /sys/block/loop*
+ local fspath=/cdrom/casper/filesystem.squashfs
+ local module=loop
+ local pattern=/sys/block/loop*
+ local offset=
+ modprobe -q -b loop
+ /sbin/udevadm settle
+ [ loop = loop ]
+ [ ! -e /dev/loop0 ]
+ losetup -f
+ dev=/dev/loop1
+ [ /dev/loop1 ]
+ [ -n  ]
+ losetup /dev/loop1 /cdrom/casper/filesystem.squashfs
+ echo /dev/loop1
+ return 0
+ echo /dev/loop1
+ backdev=/dev/loop1
+ get_fstype /dev/loop1
+ local FSTYPE
+ local FSSIZE
+ fstype
+ eval FSTYPE=squashfs FSSIZE=228237371903
+ FSTYPE=squashfs FSSIZE=228237371903
+ [ squashfs != unknown ]
+ echo squashfs
+ return 0
+ fstype=squashfs
+ [ squashfs = unknown ]
+ mkdir -p //filesystem.squashfs
+ mount -t squashfs -o ro,noatime /dev/loop1 //filesystem.squashfs
+ rofsstring=//filesystem.squashfs=ro:
+ rofslist=//filesystem.squashfs 
+ basename /cdrom/casper/*.dir
+ imagename=*.dir
+ [ -d /cdrom/casper/*.dir ]
+ [ -f /cdrom/casper/*.dir ]
+ rofsstring=//filesystem.squashfs=ro
+ mkdir -p /cow
+ cowdevice=tmpfs
+ cow_fstype=tmpfs
+ cow_mountopt=rw,noatime,mode=755
+ [ -n  ]
+ mount -t tmpfs -o rw,noatime,mode=755 tmpfs /cow
+ mounts=
+ mounts=/cow 
+ mounts=//filesystem.squashfs /cow 
+ lower=
+ [  =  ]
+ lower=//filesystem.squashfs
+ continue
+ [ //filesystem.squashfs =  ]
+ mount -t overlayfs -o upperdir=/cow,lowerdir=//filesystem.squashfs /cow /root
+ lower=/root
+ [ -n  ]
+ [ -n  ]
+ mount -t squashfs
+ cut -d  -f 3
+ mkdir -p /root/rofs
+ [ overlayfs = unionfs-fuse ]
+ mount -o move /filesystem.squashfs /root/rofs
+ break
+ log_end_msg
+ _log_msg done.\n
+ [ n = y ]
+ printf done.\n
done.
+ [ -f /cdrom/.disk/info ]
+ [ -z mint ]
+ [ overlayfs = unionfs-fuse ]
+ log_begin_msg Creating debconf-communicate fifo mechanism
+ _log_msg Begin: Creating debconf-communicate fifo mechanism ... 
+ [ n = y ]
+ printf Begin: Creating debconf-communicate fifo mechanism ... 
Begin: Creating debconf-communicate fifo mechanism ... + mkfifo /tmp/debconf-in.fifo
+ mkfifo /tmp/debconf-out.fifo
+ chroot /root mktemp -dt debconf.XXXXXX
+ DEBCONF_TMPDIR=/tmp/debconf.cnn8pk
+ cp -a /root/var/cache/debconf/config.dat /root/tmp/debconf.cnn8pk/
+ cp -a /root/var/cache/debconf/passwords.dat /root/tmp/debconf.cnn8pk/
+ sed s,^Filename: /var/cache/debconf/\(config\|passwords\).dat$,Filename: /tmp/debconf.cnn8pk/\1.dat,; /^Name: templatedb/aReadonly: true /root/etc/debconf.conf
+ debconfpid=591
+ [ ! -p /tmp/debconf-in.fifo ]
+ [ ! -p /tmp/debconf-out.fifo ]
+ log_end_msg
+ _log_msg done.\n
+ [ n = y ]
+ printf done.\n
done.
+ exec
+ + DEBCONF_SYSTEMRC=/tmp/debconf.cnn8pk/debconf.confmaybe_break chroot casper-bottom
 debconf-communicate -fnoninteractive casper
+ echo premount
+ egrep -q (,|^)casper-bottom(,|$)
+ [ n != y ]
+ log_begin_msg Running /scripts/casper-bottom
+ _log_msg Begin: Running /scripts/casper-bottom ... 
+ [ n = y ]
+ printf Begin: Running /scripts/casper-bottom ... 
Begin: Running /scripts/casper-bottom ... + run_scripts /scripts/casper-bottom
+ initdir=/scripts/casper-bottom
+ [ ! -d /scripts/casper-bottom ]
+ [ -f /scripts/casper-bottom/ORDER ]
+ . /scripts/casper-bottom/ORDER
+ /scripts/casper-bottom/01integrity_check
+ [ -e /conf/param.conf ]
+ . /conf/param.conf
+ LIVEMEDIA=/isodevice/linuxmint-13-mate-dvd-64bit.iso
+ LIVEMEDIA_OFFSET=0
+ /scripts/casper-bottom/05mountpoints
Begin: Moving mount points... ... done.
+ [ -e /conf/param.conf ]
+ . /conf/param.conf
+ LIVEMEDIA=/isodevice/linuxmint-13-mate-dvd-64bit.iso
+ LIVEMEDIA_OFFSET=0
+ /scripts/casper-bottom/05mountpoints_lupin
+ [ -e /conf/param.conf ]
+ . /conf/param.conf
+ LIVEMEDIA=/isodevice/linuxmint-13-mate-dvd-64bit.iso
+ LIVEMEDIA_OFFSET=0
+ /scripts/casper-bottom/07remove_oem_config
+ [ -e /conf/param.conf ]
+ . /conf/param.conf
+ LIVEMEDIA=/isodevice/linuxmint-13-mate-dvd-64bit.iso
+ LIVEMEDIA_OFFSET=0
+ /scripts/casper-bottom/10custom_installation
+ [ -e /conf/param.conf ]
+ . /conf/param.conf
+ LIVEMEDIA=/isodevice/linuxmint-13-mate-dvd-64bit.iso
+ LIVEMEDIA_OFFSET=0
+ /scripts/casper-bottom/10ntfs_3g
+ [ -e /conf/param.conf ]
+ . /conf/param.conf
+ LIVEMEDIA=/isodevice/linuxmint-13-mate-dvd-64bit.iso
+ LIVEMEDIA_OFFSET=0
+ /scripts/casper-bottom/12fstab
Begin: Configuring fstab... ... done.
+ [ -e /conf/param.conf ]
+ . /conf/param.conf
+ LIVEMEDIA=/isodevice/linuxmint-13-mate-dvd-64bit.iso
+ LIVEMEDIA_OFFSET=0
+ /scripts/casper-bottom/13swap
Begin: Setting up swap... ... done.
+ [ -e /conf/param.conf ]
+ . /conf/param.conf
+ LIVEMEDIA=/isodevice/linuxmint-13-mate-dvd-64bit.iso
+ LIVEMEDIA_OFFSET=0
+ /scripts/casper-bottom/14locales
Begin: Setting up locales... ... Generating locales...
  en_US.UTF-8... done
Generation complete.
done.
+ [ -e /conf/param.conf ]
+ . /conf/param.conf
+ LIVEMEDIA=/isodevice/linuxmint-13-mate-dvd-64bit.iso
+ LIVEMEDIA_OFFSET=0
+ /scripts/casper-bottom/15autologin
Begin: Setting up automatic login... ... done.
+ [ -e /conf/param.conf ]
+ . /conf/param.conf
+ LIVEMEDIA=/isodevice/linuxmint-13-mate-dvd-64bit.iso
+ LIVEMEDIA_OFFSET=0
+ /scripts/casper-bottom/18hostname
Begin: Setting hostname... ... done.
+ [ -e /conf/param.conf ]
+ . /conf/param.conf
+ LIVEMEDIA=/isodevice/linuxmint-13-mate-dvd-64bit.iso
+ LIVEMEDIA_OFFSET=0
+ /scripts/casper-bottom/19keyboard
Begin: Setting up console keyboard... ... done.
+ [ -e /conf/param.conf ]
+ . /conf/param.conf
+ LIVEMEDIA=/isodevice/linuxmint-13-mate-dvd-64bit.iso
+ LIVEMEDIA_OFFSET=0
+ /scripts/casper-bottom/20xconfig
+ [ -e /conf/param.conf ]
+ . /conf/param.conf
+ LIVEMEDIA=/isodevice/linuxmint-13-mate-dvd-64bit.iso
+ LIVEMEDIA_OFFSET=0
+ /scripts/casper-bottom/22gnome_panel_data
Begin: Configuring gnome-panel-data... ... done.
+ [ -e /conf/param.conf ]
+ . /conf/param.conf
+ LIVEMEDIA=/isodevice/linuxmint-13-mate-dvd-64bit.iso
+ LIVEMEDIA_OFFSET=0
+ /scripts/casper-bottom/22screensaver
Begin: Configuring screensaver... ... done.
+ [ -e /conf/param.conf ]
+ . /conf/param.conf
+ LIVEMEDIA=/isodevice/linuxmint-13-mate-dvd-64bit.iso
+ LIVEMEDIA_OFFSET=0
+ /scripts/casper-bottom/22serialtty
+ [ -e /conf/param.conf ]
+ . /conf/param.conf
+ LIVEMEDIA=/isodevice/linuxmint-13-mate-dvd-64bit.iso
+ LIVEMEDIA_OFFSET=0
+ /scripts/casper-bottom/22sslcert
Begin: Regenerating SSL certificate... ... done.
+ [ -e /conf/param.conf ]
+ . /conf/param.conf
+ LIVEMEDIA=/isodevice/linuxmint-13-mate-dvd-64bit.iso
+ LIVEMEDIA_OFFSET=0
+ /scripts/casper-bottom/23etc_modules
Begin: Preconfiguring /etc/modules... ... done.
+ [ -e /conf/param.conf ]
+ . /conf/param.conf
+ LIVEMEDIA=/isodevice/linuxmint-13-mate-dvd-64bit.iso
+ LIVEMEDIA_OFFSET=0
+ /scripts/casper-bottom/23networking
Begin: Preconfiguring networking... ... done.
+ [ -e /conf/param.conf ]
+ . /conf/param.conf
+ LIVEMEDIA=/isodevice/linuxmint-13-mate-dvd-64bit.iso
+ LIVEMEDIA_OFFSET=0
+ /scripts/casper-bottom/24preseed
Begin: Loading preseed file... ... done.
+ [ -e /conf/param.conf ]
+ . /conf/param.conf
+ LIVEMEDIA=/isodevice/linuxmint-13-mate-dvd-64bit.iso
+ LIVEMEDIA_OFFSET=0
+ /scripts/casper-bottom/25adduser
Begin: Adding live session user... ... done.
+ [ -e /conf/param.conf ]
+ . /conf/param.conf
+ LIVEMEDIA=/isodevice/linuxmint-13-mate-dvd-64bit.iso
+ LIVEMEDIA_OFFSET=0
+ /scripts/casper-bottom/25configure_init
Begin: Setting up init... ... done.
+ [ -e /conf/param.conf ]
+ . /conf/param.conf
+ LIVEMEDIA=/isodevice/linuxmint-13-mate-dvd-64bit.iso
+ LIVEMEDIA_OFFSET=0
+ /scripts/casper-bottom/26disable_user_menu
Begin: Disabling user menu... ... done.
+ [ -e /conf/param.conf ]
+ . /conf/param.conf
+ LIVEMEDIA=/isodevice/linuxmint-13-mate-dvd-64bit.iso
+ LIVEMEDIA_OFFSET=0
+ /scripts/casper-bottom/30accessibility
Begin: Configuring accessibility options... ... done.
+ [ -e /conf/param.conf ]
+ . /conf/param.conf
+ LIVEMEDIA=/isodevice/linuxmint-13-mate-dvd-64bit.iso
+ LIVEMEDIA_OFFSET=0
+ /scripts/casper-bottom/31disable_update_notifier
Begin: Disabling update-notifier... ... ln: /root/usr/lib/update-notifier/apt-check: No such file or directory
ln: /root/usr/lib/update-manager/check-new-release: No such file or directory
ln: /root/usr/lib/update-manager/check-new-release-gtk: No such file or directory
done.
+ [ -e /conf/param.conf ]
+ . /conf/param.conf
+ LIVEMEDIA=/isodevice/linuxmint-13-mate-dvd-64bit.iso
+ LIVEMEDIA_OFFSET=0
+ /scripts/casper-bottom/32disable_hibernation
Begin: Configuring power management... ... done.
+ [ -e /conf/param.conf ]
+ . /conf/param.conf
+ LIVEMEDIA=/isodevice/linuxmint-13-mate-dvd-64bit.iso
+ LIVEMEDIA_OFFSET=0
+ /scripts/casper-bottom/33enable_apport_crashes
Begin: Enabling detection of crashes... ... grep: /root/etc/default/apport: No such file or directory
done.
+ [ -e /conf/param.conf ]
+ . /conf/param.conf
+ LIVEMEDIA=/isodevice/linuxmint-13-mate-dvd-64bit.iso
+ LIVEMEDIA_OFFSET=0
+ /scripts/casper-bottom/34disable_kde_services
Begin: Disabling unnecessary KDE services... ... done.
+ [ -e /conf/param.conf ]
+ . /conf/param.conf
+ LIVEMEDIA=/isodevice/linuxmint-13-mate-dvd-64bit.iso
+ LIVEMEDIA_OFFSET=0
+ /scripts/casper-bottom/35fix_language_selector
Begin: Fixing language selector... ... /usr/lib/python2.7/dist-packages/LanguageSelector/LocaleInfo.py:256: UserWarning: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
  warnings.warn(msg.args[0].encode('UTF-8'))
done.
+ [ -e /conf/param.conf ]
+ . /conf/param.conf
+ LIVEMEDIA=/isodevice/linuxmint-13-mate-dvd-64bit.iso
+ LIVEMEDIA_OFFSET=0
+ /scripts/casper-bottom/36disable_trackerd
Begin: Disabling trackerd... ... done.
+ [ -e /conf/param.conf ]
+ . /conf/param.conf
+ LIVEMEDIA=/isodevice/linuxmint-13-mate-dvd-64bit.iso
+ LIVEMEDIA_OFFSET=0
+ /scripts/casper-bottom/40install_driver_updates
+ [ -e /conf/param.conf ]
+ . /conf/param.conf
+ LIVEMEDIA=/isodevice/linuxmint-13-mate-dvd-64bit.iso
+ LIVEMEDIA_OFFSET=0
+ /scripts/casper-bottom/41apt_cdrom
Begin: Adding APT-CDROM source... ... Using CD-ROM mount point /cdrom/
Identifying.. [4730cad167e7cfb00ad85179e8f91378-2]
Scanning disc for index files..
Found 0 package indexes, 0 source indexes, 0 translation indexes and 0 signatures
E: Unable to locate any package files, perhaps this is not a Debian Disc or the wrong architecture?
done.
+ [ -e /conf/param.conf ]
+ . /conf/param.conf
+ LIVEMEDIA=/isodevice/linuxmint-13-mate-dvd-64bit.iso
+ LIVEMEDIA_OFFSET=0
+ /scripts/casper-bottom/43disable_updateinitramfs
Begin: Possibly disabling update-initramfs (useless on a live CD)... ... done.
+ [ -e /conf/param.conf ]
+ . /conf/param.conf
+ LIVEMEDIA=/isodevice/linuxmint-13-mate-dvd-64bit.iso
+ LIVEMEDIA_OFFSET=0
+ /scripts/casper-bottom/44pk_allow_ubuntu
Begin: Grant administrative PolicyKit privileges to default user... ... done.
+ [ -e /conf/param.conf ]
+ . /conf/param.conf
+ LIVEMEDIA=/isodevice/linuxmint-13-mate-dvd-64bit.iso
+ LIVEMEDIA_OFFSET=0
+ /scripts/casper-bottom/45jackd2
Begin: Configuring jackd2... ... done.
+ [ -e /conf/param.conf ]
+ . /conf/param.conf
+ LIVEMEDIA=/isodevice/linuxmint-13-mate-dvd-64bit.iso
+ LIVEMEDIA_OFFSET=0
+ /scripts/casper-bottom/48kubuntu_disable_restart_notifications
+ [ -e /conf/param.conf ]
+ . /conf/param.conf
+ LIVEMEDIA=/isodevice/linuxmint-13-mate-dvd-64bit.iso
+ LIVEMEDIA_OFFSET=0
+ /scripts/casper-bottom/49kubuntu_mobile_session
+ [ -e /conf/param.conf ]
+ . /conf/param.conf
+ LIVEMEDIA=/isodevice/linuxmint-13-mate-dvd-64bit.iso
+ LIVEMEDIA_OFFSET=0
+ /scripts/casper-bottom/50ubiquity-bluetooth-agent
+ [ -e /conf/param.conf ]
+ . /conf/param.conf
+ LIVEMEDIA=/isodevice/linuxmint-13-mate-dvd-64bit.iso
+ LIVEMEDIA_OFFSET=0
+ [ n != y ]
+ log_end_msg
+ _log_msg done.\n
+ [ n = y ]
+ printf done.\n
done.
+ [ overlayfs = unionfs-fuse ]
+ exec
+ rm -f /tmp/debconf-in.fifo
+ rm -f /tmp/debconf-out.fifo
+ wait 591
+ chroot /root debconf-copydb tmpdb config --config=Name:tmpdb --config=Driver:File --config=Filename:/tmp/debconf.cnn8pk/config.dat
+ chroot /root debconf-copydb tmpdb passwords --config=Name:tmpdb --config=Driver:File --config=Filename:/tmp/debconf.cnn8pk/passwords.dat
+ rm -rf /tmp/debconf.cnn8pk
+ exec
+ exec
As you can see, LIVEMEDIA=/isodevice/linuxmint-13-mate-dvd-64bit.iso gets created successfully. After that the script has no problem creating a loopback and mounting the iso, finally the squashfs is mounted, so all is well.

The question is, why it doesn't work in our failed case.

I think maybe the memory space or whatever is not working out between GRUB2 and the Linux kernel somehow?

Let me know if you want to test any of these cases. :)

By the way, I can break before premount, and the directories /cdrom and /isodevice have not been created. At this point, type exit, then hit enter and watch the premount scripts run, they will be logged, then you can mount your USB and copy them over (casper.log and dmesg). Here is how I run the linux line when I want to break before premount, also with debuggin on (supposedly);

Code: Select all

linux /casper/vmlinuz  file=/cdrom/preseed/mint.seed boot=casper priority=low BOOT_DEBUG=2 break=premount --
I found the BOOT_DEBUG=2 on some boot time debug site for Ubuntu, but I have also seen debug=2 as an option. Not sure if this kernel is responding to those. priority=low is supposed to show all low, medium, and high priority messages, the default otherwise is high only.

breaker
breaker

Re: Linux Mint 13: Grub2 ISO Loopback Not Working?

Post by breaker »

Below is a working LM13 MATE 32bit USB flash drive Syslinux boot:

Found some notes that indicate this line is fine for debugging, so I have been using it;

Code: Select all

linux /casper/vmlinuz  file=/cdrom/preseed/mint.seed boot=casper priority=low debug=y break=premount --
So, debug=y is what we need. Anyway, it looks like on a syslinux booted system, it doesn't mount /isodevice, but it does mount the flash drive (/cdrom) read-only (system booted fine);

Code: Select all

/cow on / type overlayfs (rw)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
/dev/sdb1 on /cdrom type vfat (ro,noatime,fmask=0022,dmask=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro) [SanDisk]
/dev/loop0 on /rofs type squashfs (ro,noatime)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
gvfs-fuse-daemon on /home/mint/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=mint)
The /var/log/casper.log shows that one error, but it doesn't prevent the system from starting (see on line 154-158 it is there);

Code: Select all

+ tailpid=336
+ parse_cmdline
+ cat /proc/cmdline
+ [  =  ]
+ export UNIONFS=DEFAULT
+ set_usplash_timeout
+ [ -x /sbin/usplash_write ]
+ start_usplash_pulse
+ [ -x /sbin/usplash_write ]
+ [ n != y ]
+ log_begin_msg Running /scripts/casper-premount
+ _log_msg Begin: Running /scripts/casper-premount ... 
+ [ n = y ]
+ printf Begin: Running /scripts/casper-premount ... 
Begin: Running /scripts/casper-premount ... + run_scripts /scripts/casper-premount
+ initdir=/scripts/casper-premount
+ [ ! -d /scripts/casper-premount ]
+ [ -f /scripts/casper-premount/ORDER ]
+ . /scripts/casper-premount/ORDER
+ /scripts/casper-premount/10driver_updates
done.
+ [ -e /conf/param.conf ]
+ /scripts/casper-premount/20iso_scan
+ [ -e /conf/param.conf ]
+ /scripts/casper-premount/30custom_installation
+ [ -e /conf/param.conf ]
+ [ n != y ]
+ log_end_msg
+ _log_msg done.\n
+ [ n+  =tail y -f ]
 casper.log
+ printf done.\n
done.
+ set_usplash_timeout
+ [ -x /sbin/usplash_write ]
+ [ ! -z  ]
+ i=0
+ [ 0 -lt 60 ]
+ find_livefs 0
+ timeout=0
+ [ ! -z  ]
+ [ -n  ]
+ egrep -v /(loop|ram|fd)
+ echo /sys/block/loop0 /sys/block/loop1 /sys/block/loop2 /sys/block/loop3 /sys/block/loop4 /sys/block/loop5 /sys/block/loop6 /sys/block/loop7 /sys/block/ram0 /sys/block/ram1 /sys/block/ram10 /sys/block/ram11 /sys/block/ram12 /sys/block/ram13 /sys/block/ram14 /sys/block/ram15 /sys/block/ram2 /sys/block/ram3 /sys/block/ram4 /sys/block/ram5 /sys/block/ram6 /sys/block/ram7 /sys/block/ram8 /sys/block/ram9 /sys/block/sda /sys/block/sdb /sys/block/sr0
+ tr   \n
+ sys2dev /sys/block/sda
+ sysdev=/block/sda
+ /sbin/udevadm info -q name -p /block/sda
+ echo /dev/sda
+ devname=/dev/sda
+ [ -e /dev/sda ]
+ get_fstype /dev/sda
+ local FSTYPE
+ local FSSIZE
+ fstype
+ eval FSTYPE=unknown FSSIZE=0
+ FSTYPE=unknown FSSIZE=0
+ [ unknown != unknown ]
+ /sbin/blkid -s TYPE -o value /dev/sda
+ fstype=
+ /lib/udev/cdrom_id /dev/sda
+ is_nice_device /sys/block/sda
+ sysfs_path=/block/sda
+ /sbin/udevadm test-builtin path_id /block/sda
+ egrep -q ID_PATH=(usb|pci-[^-]*-(ide|sas|scsi|usb|virtio)|platform-sata_mv|platform-orion-ehci|platform-mmc|platform-mxsdhci|platform-omap_hsmmc|platform-sdhci-tegra)
+ return 0
+ subdevices /sys/block/sda
+ sysblock=/sys/block/sda
+ r=
+ [ -e /sys/block/sda/dev ]
+ r= /sys/block/sda
+ [ -e /sys/block/sda/alignment_offset/dev ]
+ [ -e /sys/block/sda/bdi/dev ]
+ [ -e /sys/block/sda/capability/dev ]
+ [ -e /sys/block/sda/dev/dev ]
+ [ -e /sys/block/sda/device/dev ]
+ [ -e /sys/block/sda/discard_alignment/dev ]
+ [ -e /sys/block/sda/events/dev ]
+ [ -e /sys/block/sda/events_async/dev ]
+ [ -e /sys/block/sda/events_poll_msecs/dev ]
+ [ -e /sys/block/sda/ext_range/dev ]
+ [ -e /sys/block/sda/holders/dev ]
+ [ -e /sys/block/sda/inflight/dev ]
+ [ -e /sys/block/sda/power/dev ]
+ [ -e /sys/block/sda/queue/dev ]
+ [ -e /sys/block/sda/range/dev ]
+ [ -e /sys/block/sda/removable/dev ]
+ [ -e /sys/block/sda/ro/dev ]
+ [ -e /sys/block/sda/sda1/dev ]
+ r= /sys/block/sda /sys/block/sda/sda1
+ [ -e /sys/block/sda/size/dev ]
+ [ -e /sys/block/sda/slaves/dev ]
+ [ -e /sys/block/sda/stat/dev ]
+ [ -e /sys/block/sda/subsystem/dev ]
+ [ -e /sys/block/sda/trace/dev ]
+ [ -e /sys/block/sda/uevent/dev ]
+ echo /sys/block/sda /sys/block/sda/sda1
+ check_dev /sys/block/sda
+ sysdev=/sys/block/sda
+ devname=
+ skip_uuid_check=
+ [ -z  ]
+ sys2dev /sys/block/sda
+ sysdev=/block/sda
+ /sbin/udevadm info -q name -p /block/sda
+ echo /dev/sda
+ devname=/dev/sda
+ [ -d /dev/sda ]
+ [ -e /dev/sda ]
+ [ -n  ]
+ get_fstype /dev/sda
+ local FSTYPE
+ local FSSIZE
+ fstype
+ eval FSTYPE=unknown FSSIZE=0
+ FSTYPE=unknown FSSIZE=0
+ [ unknown != unknown ]
+ /sbin/blkid -s TYPE -o value /dev/sda
+ fstype=
+ is_supported_fs
+ fstype=
+ return 1
+ [ -n  ]
+ return 1
+ check_dev /sys/block/sda/sda1
+ sysdev=/sys/block/sda/sda1
+ devname=
+ skip_uuid_check=
+ [ -z  ]
+ sys2dev /sys/block/sda/sda1
+ sysdev=/block/sda/sda1
+ /sbin/udevadm info -q name -p /block/sda/sda1
+ echo /dev/sda1
+ devname=/dev/sda1
+ [ -d /dev/sda1 ]
+ [ -e /dev/sda1 ]
+ [ -n  ]
+ get_fstype /dev/sda1
+ local FSTYPE
+ local FSSIZE
+ fstype
+ eval FSTYPE=unknown FSSIZE=0
+ FSTYPE=unknown FSSIZE=0
+ [ unknown != unknown ]
+ /sbin/blkid -s TYPE -o value /dev/sda1
+ fstype=ntfs
+ is_supported_fs ntfs
+ fstype=ntfs
+ return 0
+ blkid -o value -s UUID /dev/sda1
+ devuid=62B64CF3B64CC8ED
+ [ -n 62B64CF3B64CC8ED ]
+ grep -qs \<62B64CF3B64CC8ED\> /tmp/tried
+ mount -t ntfs -o ro,noatime /dev/sda1 /cdrom
/sbin/mount.ntfs: line 1: ELF: not found
/sbin/mount.ntfs: line 2: €: not found
/sbin/mount.ntfs: line 3: syntax error: unexpected ")"
mount: mounting /dev/sda1 on /cdrom failed: No such device
+ continue
+ sys2dev /sys/block/sdb
+ sysdev=/block/sdb
+ /sbin/udevadm info -q name -p /block/sdb
+ echo /dev/sdb
+ devname=/dev/sdb
+ [ -e /dev/sdb ]
+ get_fstype /dev/sdb
+ local FSTYPE
+ local FSSIZE
+ fstype
+ eval FSTYPE=unknown FSSIZE=0
+ FSTYPE=unknown FSSIZE=0
+ [ unknown != unknown ]
+ /sbin/blkid -s TYPE -o value /dev/sdb
+ fstype=
+ /lib/udev/cdrom_id /dev/sdb
+ is_nice_device /sys/block/sdb
+ sysfs_path=/block/sdb
+ egrep -q ID_PATH=(usb|pci-[^-]*-(ide|sas|scsi|usb|virtio)|platform-sata_mv|platform-orion-ehci|platform-mmc|platform-mxsdhci|platform-omap_hsmmc|platform-sdhci-tegra)
+ /sbin/udevadm test-builtin path_id /block/sdb
+ return 0
+ subdevices /sys/block/sdb
+ sysblock=/sys/block/sdb
+ r=
+ [ -e /sys/block/sdb/dev ]
+ r= /sys/block/sdb
+ [ -e /sys/block/sdb/alignment_offset/dev ]
+ [ -e /sys/block/sdb/bdi/dev ]
+ [ -e /sys/block/sdb/capability/dev ]
+ [ -e /sys/block/sdb/dev/dev ]
+ [ -e /sys/block/sdb/device/dev ]
+ [ -e /sys/block/sdb/discard_alignment/dev ]
+ [ -e /sys/block/sdb/events/dev ]
+ [ -e /sys/block/sdb/events_async/dev ]
+ [ -e /sys/block/sdb/events_poll_msecs/dev ]
+ [ -e /sys/block/sdb/ext_range/dev ]
+ [ -e /sys/block/sdb/holders/dev ]
+ [ -e /sys/block/sdb/inflight/dev ]
+ [ -e /sys/block/sdb/power/dev ]
+ [ -e /sys/block/sdb/queue/dev ]
+ [ -e /sys/block/sdb/range/dev ]
+ [ -e /sys/block/sdb/removable/dev ]
+ [ -e /sys/block/sdb/ro/dev ]
+ [ -e /sys/block/sdb/sdb1/dev ]
+ r= /sys/block/sdb /sys/block/sdb/sdb1
+ [ -e /sys/block/sdb/size/dev ]
+ [ -e /sys/block/sdb/slaves/dev ]
+ [ -e /sys/block/sdb/stat/dev ]
+ [ -e /sys/block/sdb/subsystem/dev ]
+ [ -e /sys/block/sdb/trace/dev ]
+ [ -e /sys/block/sdb/uevent/dev ]
+ echo /sys/block/sdb /sys/block/sdb/sdb1
+ check_dev /sys/block/sdb
+ sysdev=/sys/block/sdb
+ devname=
+ skip_uuid_check=
+ [ -z  ]
+ sys2dev /sys/block/sdb
+ sysdev=/block/sdb
+ /sbin/udevadm info -q name -p /block/sdb
+ echo /dev/sdb
+ devname=/dev/sdb
+ [ -d /dev/sdb ]
+ [ -e /dev/sdb ]
+ [ -n  ]
+ get_fstype /dev/sdb
+ local FSTYPE
+ local FSSIZE
+ fstype
+ eval FSTYPE=unknown FSSIZE=0
+ FSTYPE=unknown FSSIZE=0
+ [ unknown != unknown ]
+ /sbin/blkid -s TYPE -o value /dev/sdb
+ fstype=
+ is_supported_fs
+ fstype=
+ return 1
+ [ -n  ]
+ return 1
+ check_dev /sys/block/sdb/sdb1
+ sysdev=/sys/block/sdb/sdb1
+ devname=
+ skip_uuid_check=
+ [ -z  ]
+ sys2dev /sys/block/sdb/sdb1
+ sysdev=/block/sdb/sdb1
+ /sbin/udevadm info -q name -p /block/sdb/sdb1
+ echo /dev/sdb1
+ devname=/dev/sdb1
+ [ -d /dev/sdb1 ]
+ [ -e /dev/sdb1 ]
+ [ -n  ]
+ get_fstype /dev/sdb1
+ local FSTYPE
+ local FSSIZE
+ fstype
+ eval FSTYPE=unknown FSSIZE=0
+ FSTYPE=unknown FSSIZE=0
+ [ unknown != unknown ]
+ /sbin/blkid -s TYPE -o value /dev/sdb1
+ fstype=vfat
+ is_supported_fs vfat
+ fstype=vfat
+ return 0
+ blkid -o value -s UUID /dev/sdb1
+ devuid=D921-3C64
+ [ -n D921-3C64 ]
+ grep -qs \<D921-3C64\> /tmp/tried
+ mount -t vfat -o ro,noatime /dev/sdb1 /cdrom
+ [ -n D921-3C64 ]
+ echo D921-3C64
+ is_casper_path /cdrom
+ path=/cdrom
+ [ -d /cdrom/casper ]
+ echo /cdrom/casper/filesystem.squashfs
+ [ /cdrom/casper/filesystem.squashfs != /cdrom/casper/*.squashfs ]
+ return 0
+ [  ]
+ [ 7ee670a6-12a6-40ed-9fc5-71d6a31c4db4 = D921-3C64 ]
+ matches_uuid /cdrom
+ [ -z 7ee670a6-12a6-40ed-9fc5-71d6a31c4db4 ]
+ path=/cdrom
+ [ -e /cdrom/.disk/casper-uuid-generic ]
+ cat /cdrom/.disk/casper-uuid-generic
+ try_uuid=7ee670a6-12a6-40ed-9fc5-71d6a31c4db4
+ [ 7ee670a6-12a6-40ed-9fc5-71d6a31c4db4 = 7ee670a6-12a6-40ed-9fc5-71d6a31c4db4 ]
+ return 0
+ echo /cdrom
+ return 0
+ return 0
+ livefs_root=/cdrom
+ [ /cdrom ]
+ break
+ [ -z /cdrom ]
+ [  ]
+ [  ]
+ [  ]
+ mount_images_in_directory /cdrom /root
+ directory=/cdrom
+ rootmnt=/root
+ match_files_in_dir /cdrom/casper/*.squashfs
+ local pattern=/cdrom/casper/*.squashfs
+ echo /cdrom/casper/filesystem.squashfs
+ [ /cdrom/casper/filesystem.squashfs != /cdrom/casper/*.squashfs ]
+ return 0
+ setup_unionfs /cdrom/casper /root
+ image_directory=/cdrom/casper
+ rootmnt=/root
+ [ DEFAULT = DEFAULT ]
+ modprobe -q -b overlayfs
+ cut -f2 /proc/filesystems
+ grep -q ^overlayfs$
+ UNIONFS=overlayfs
+ break
+ [ overlayfs = DEFAULT -a -x /bin/unionfs-fuse ]
+ [ overlayfs = DEFAULT ]
+ croot=/
+ rofsstring=
+ rofslist=
+ [ overlayfs = aufs ]
+ [ overlayfs = unionfs-fuse ]
+ roopt=ro
+ mkdir -p /
+ basename /cdrom/casper/*.ext2
+ imagename=*.ext2
+ [ -d /cdrom/casper/*.ext2 ]
+ [ -f /cdrom/casper/*.ext2 ]
+ basename /cdrom/casper/filesystem.squashfs
+ imagename=filesystem.squashfs
+ [ -d /cdrom/casper/filesystem.squashfs ]
+ [ -f /cdrom/casper/filesystem.squashfs ]
+ get_backing_device /cdrom/casper/filesystem.squashfs
+ setup_loop /cdrom/casper/filesystem.squashfs loop /sys/block/loop*
+ local fspath=/cdrom/casper/filesystem.squashfs
+ local module=loop
+ local pattern=/sys/block/loop*
+ local offset=
+ modprobe -q -b loop
+ /sbin/udevadm settle
+ [ loop = loop ]
+ [ ! -e /dev/loop0 ]
+ losetup -f
+ dev=/dev/loop0
+ [ /dev/loop0 ]
+ [ -n  ]
+ losetup /dev/loop0 /cdrom/casper/filesystem.squashfs
+ echo /dev/loop0
+ return 0
+ echo /dev/loop0
+ backdev=/dev/loop0
+ get_fstype /dev/loop0
+ local FSTYPE
+ local FSSIZE
+ fstype
+ eval FSTYPE=squashfs FSSIZE=232274834943
+ FSTYPE=squashfs FSSIZE=232274834943
+ [ squashfs != unknown ]
+ echo squashfs
+ return 0
+ fstype=squashfs
+ [ squashfs = unknown ]
+ mkdir -p //filesystem.squashfs
+ mount -t squashfs -o ro,noatime /dev/loop0 //filesystem.squashfs
+ rofsstring=//filesystem.squashfs=ro:
+ rofslist=//filesystem.squashfs 
+ basename /cdrom/casper/*.dir
+ imagename=*.dir
+ [ -d /cdrom/casper/*.dir ]
+ [ -f /cdrom/casper/*.dir ]
+ rofsstring=//filesystem.squashfs=ro
+ mkdir -p /cow
+ cowdevice=tmpfs
+ cow_fstype=tmpfs
+ cow_mountopt=rw,noatime,mode=755
+ [ -n  ]
+ mount -t tmpfs -o rw,noatime,mode=755 tmpfs /cow
+ mounts=
+ mounts=/cow 
+ mounts=//filesystem.squashfs /cow 
+ lower=
+ [  =  ]
+ lower=//filesystem.squashfs
+ continue
+ [ //filesystem.squashfs =  ]
+ mount -t overlayfs -o upperdir=/cow,lowerdir=//filesystem.squashfs /cow /root
+ lower=/root
+ [ -n  ]
+ [ -n  ]
+ cut+  -fmount 3
 -t squashfs
+ mkdir -p /root/rofs
+ [ overlayfs = unionfs-fuse ]
+ mount -o move /filesystem.squashfs /root/rofs
+ break
+ log_end_msg
+ _log_msg done.\n
+ [ n = y ]
+ printf done.\n
done.
+ [ -f /cdrom/.disk/info ]
+ [ -z mint ]
+ [ overlayfs = unionfs-fuse ]
+ log_begin_msg Creating debconf-communicate fifo mechanism
+ _log_msg Begin: Creating debconf-communicate fifo mechanism ... 
+ [ n = y ]
+ printf Begin: Creating debconf-communicate fifo mechanism ... 
Begin: Creating debconf-communicate fifo mechanism ... + mkfifo /tmp/debconf-in.fifo
+ mkfifo /tmp/debconf-out.fifo
+ chroot /root mktemp -dt debconf.XXXXXX
+ DEBCONF_TMPDIR=/tmp/debconf.nMiJhP
+ cp -a /root/var/cache/debconf/config.dat /root/tmp/debconf.nMiJhP/
+ cp -a /root/var/cache/debconf/passwords.dat /root/tmp/debconf.nMiJhP/
+ sed s,^Filename: /var/cache/debconf/\(config\|passwords\).dat$,Filename: /tmp/debconf.nMiJhP/\1.dat,; /^Name: templatedb/aReadonly: true /root/etc/debconf.conf
+ debconfpid=450
+ [ ! -p /tmp/debconf-in.fifo ]
+ [ ! -p /tmp/debconf-out.fifo ]
+ log_end_msg
+ _log_msg done.\n
+ [ n = y ]
+ printf done.\n
done.
+ exec
+ + DEBCONF_SYSTEMRC=/tmp/debconf.nMiJhP/debconf.confmaybe_break chroot casper-bottom /root
 debconf-communicate -fnoninteractive casper
+ echo 
+ egrep -q (,|^)casper-bottom(,|$)
+ [ n != y ]
+ log_begin_msg Running /scripts/casper-bottom
+ _log_msg Begin: Running /scripts/casper-bottom ... 
+ [ n = y ]
+ printf Begin: Running /scripts/casper-bottom ... 
Begin: Running /scripts/casper-bottom ... + run_scripts /scripts/casper-bottom
+ initdir=/scripts/casper-bottom
+ [ ! -d /scripts/casper-bottom ]
+ [ -f /scripts/casper-bottom/ORDER ]
+ . /scripts/casper-bottom/ORDER
+ /scripts/casper-bottom/01integrity_check
+ [ -e /conf/param.conf ]
+ /scripts/casper-bottom/05mountpoints
Begin: Moving mount points... ... done.
+ [ -e /conf/param.conf ]
+ /scripts/casper-bottom/05mountpoints_lupin
+ [ -e /conf/param.conf ]
+ /scripts/casper-bottom/07remove_oem_config
+ [ -e /conf/param.conf ]
+ /scripts/casper-bottom/10custom_installation
+ [ -e /conf/param.conf ]
+ /scripts/casper-bottom/10ntfs_3g
+ [ -e /conf/param.conf ]
+ /scripts/casper-bottom/12fstab
Begin: Configuring fstab... ... done.
+ [ -e /conf/param.conf ]
+ /scripts/casper-bottom/13swap
Begin: Setting up swap... ... done.
+ [ -e /conf/param.conf ]
+ /scripts/casper-bottom/14locales
Begin: Setting up locales... ... Generating locales...
  en_US.UTF-8... done
Generation complete.
done.
+ [ -e /conf/param.conf ]
+ /scripts/casper-bottom/15autologin
Begin: Setting up automatic login... ... done.
+ [ -e /conf/param.conf ]
+ /scripts/casper-bottom/18hostname
Begin: Setting hostname... ... done.
+ [ -e /conf/param.conf ]
+ /scripts/casper-bottom/19keyboard
Begin: Setting up console keyboard... ... done.
+ [ -e /conf/param.conf ]
+ /scripts/casper-bottom/20xconfig
+ [ -e /conf/param.conf ]
+ /scripts/casper-bottom/22gnome_panel_data
Begin: Configuring gnome-panel-data... ... done.
+ [ -e /conf/param.conf ]
+ /scripts/casper-bottom/22screensaver
Begin: Configuring screensaver... ... done.
+ [ -e /conf/param.conf ]
+ /scripts/casper-bottom/22serialtty
+ [ -e /conf/param.conf ]
+ /scripts/casper-bottom/22sslcert
Begin: Regenerating SSL certificate... ... done.
+ [ -e /conf/param.conf ]
+ /scripts/casper-bottom/23etc_modules
Begin: Preconfiguring /etc/modules... ... done.
+ [ -e /conf/param.conf ]
+ /scripts/casper-bottom/23networking
Begin: Preconfiguring networking... ... done.
+ [ -e /conf/param.conf ]
+ /scripts/casper-bottom/24preseed
Begin: Loading preseed file... ... done.
+ [ -e /conf/param.conf ]
+ /scripts/casper-bottom/25adduser
Begin: Adding live session user... ... done.
+ [ -e /conf/param.conf ]
+ /scripts/casper-bottom/25configure_init
Begin: Setting up init... ... done.
+ [ -e /conf/param.conf ]
+ /scripts/casper-bottom/26disable_user_menu
Begin: Disabling user menu... ... done.
+ [ -e /conf/param.conf ]
+ /scripts/casper-bottom/30accessibility
Begin: Configuring accessibility options... ... done.
+ [ -e /conf/param.conf ]
+ /scripts/casper-bottom/31disable_update_notifier
Begin: Disabling update-notifier... ... ln: /root/usr/lib/update-notifier/apt-check: No such file or directory
ln: /root/usr/lib/update-manager/check-new-release: No such file or directory
ln: /root/usr/lib/update-manager/check-new-release-gtk: No such file or directory
done.
+ [ -e /conf/param.conf ]
+ /scripts/casper-bottom/32disable_hibernation
Begin: Configuring power management... ... done.
+ [ -e /conf/param.conf ]
+ /scripts/casper-bottom/33enable_apport_crashes
Begin: Enabling detection of crashes... ... grep: /root/etc/default/apport: No such file or directory
done.
+ [ -e /conf/param.conf ]
+ /scripts/casper-bottom/34disable_kde_services
Begin: Disabling unnecessary KDE services... ... done.
+ [ -e /conf/param.conf ]
+ /scripts/casper-bottom/35fix_language_selector
Begin: Fixing language selector... ... /usr/lib/python2.7/dist-packages/LanguageSelector/LocaleInfo.py:256: UserWarning: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
  warnings.warn(msg.args[0].encode('UTF-8'))
done.
+ [ -e /conf/param.conf ]
+ /scripts/casper-bottom/36disable_trackerd
Begin: Disabling trackerd... ... done.
+ [ -e /conf/param.conf ]
+ /scripts/casper-bottom/40install_driver_updates
+ [ -e /conf/param.conf ]
+ /scripts/casper-bottom/41apt_cdrom
Begin: Adding APT-CDROM source... ... Using CD-ROM mount point /cdrom/
Identifying.. [2300d27cefaeea02821992e583bdfc78-2]
Scanning disc for index files..
Found 0 package indexes, 0 source indexes, 0 translation indexes and 0 signatures
E: Unable to locate any package files, perhaps this is not a Debian Disc or the wrong architecture?
done.
+ [ -e /conf/param.conf ]
+ /scripts/casper-bottom/43disable_updateinitramfs
Begin: Possibly disabling update-initramfs (useless on a live CD)... ... done.
+ [ -e /conf/param.conf ]
+ /scripts/casper-bottom/44pk_allow_ubuntu
Begin: Grant administrative PolicyKit privileges to default user... ... done.
+ [ -e /conf/param.conf ]
+ /scripts/casper-bottom/45jackd2
Begin: Configuring jackd2... ... done.
+ [ -e /conf/param.conf ]
+ /scripts/casper-bottom/48kubuntu_disable_restart_notifications
+ [ -e /conf/param.conf ]
+ /scripts/casper-bottom/49kubuntu_mobile_session
+ [ -e /conf/param.conf ]
+ /scripts/casper-bottom/50ubiquity-bluetooth-agent
+ [ -e /conf/param.conf ]
+ [ n != y ]
+ log_end_msg
+ _log_msg done.\n
+ [ n = y ]
+ printf done.\n
done.
+ [ overlayfs = unionfs-fuse ]
+ exec
+ rm -f /tmp/debconf-in.fifo
+ rm -f /tmp/debconf-out.fifo
+ wait 450
+ chroot /root debconf-copydb tmpdb config --config=Name:tmpdb --config=Driver:File --config=Filename:/tmp/debconf.nMiJhP/config.dat
+ chroot /root debconf-copydb tmpdb passwords --config=Name:tmpdb --config=Driver:File --config=Filename:/tmp/debconf.nMiJhP/passwords.dat
+ rm -rf /tmp/debconf.nMiJhP
+ exec
+ exec
So, it doesn't use iso-scan, but even when I don't tell GRUB to use iso-scan, it still fails. But above, on line 268, the flash drive mounts fine on /cdrom.

As far as the 32bit iso-scan function or some reason during the boot process, the scripts fail. Next I need to compare a successful 64bit casper.log to see what worked compared to a failed boot.

Also, a good question is, are the contents of initrd the same for 32bit and 64bit. I will have to diff them.

This looks good to read; http://manpages.ubuntu.com/manpages/kar ... per.7.html

I don't know what to make of it yet. In other words, if it is GRUB, linux, or the scripts that are the problem, but the scripts fail at the iso-scan script seemingly.

Related or similar? https://bugs.launchpad.net/ubuntu/+sour ... bug/910924

I will have to look more closely at the scripts and logs when I have a bit more time. Right now just gathering the info to isolate the problem... :wink:
User avatar
darethehair
Level 4
Level 4
Posts: 239
Joined: Sun Mar 08, 2009 2:22 pm
Location: Morden Manitoba Canada
Contact:

Re: Linux Mint 13: Grub2 ISO Loopback Not Working?

Post by darethehair »

Good job on your continued sleuthing, breaker! You have now gone *far* beyond what I could have done myself.

This makes me wonder if the root cause is something intrinsic to Ubuntu-derivative distros i.e. could the Mint folks could not have foreseen or avoided this?
There is nothing more dangerous than a bored cat.
breaker

Re: Linux Mint 13: Grub2 ISO Loopback Not Working?

Post by breaker »

OK, I have found a way to help the 32bit ISOs finish booting via GRUB loopback.

After you get to the usual failure,
Could not find the ISO /linuxmint-13-mate-dvd-32bit.iso
At the busybox shell the ls command (list command) shows the directories /cdrom and /isodevice exist but mount shows /cdrom nor /isodevice as mounted, which is why the script in initrd, /scripts/casper-premount/20iso_scan can't find the proper path to the Live Media squashfs. This seems to happen earlier on when another script (/scripts/lupin-helpers or /scripts/casper-helpers) fails to find and mount the USB flash drive (always seems to be /dev/sdb1 for me), and therefore fails to mount the iso on a loopback device. So somewhere it seems to have an issue scanning the USB flash drive to find the ISO.

Anyway, after the failure message and the shell prompt, you can do this and it will resume booting to the Live System;

Code: Select all

mount -t vfat /dev/sdb1 /isodevice
mount -t iso9660 -o loop /isodevice/linuxmint-13-mate-dvd-32bit.iso /cdrom
echo "LIVEMEDIA=/cdrom/casper" >> /conf/param.conf
echo "LIVEMEDIA_OFFSET=0" >> /conf/param.conf
Then hit CTRL+D to exit and it will boot.

This is where the iso is in the root of the USB flash drive.

:wink:
User avatar
darethehair
Level 4
Level 4
Posts: 239
Joined: Sun Mar 08, 2009 2:22 pm
Location: Morden Manitoba Canada
Contact:

Re: Linux Mint 13: Grub2 ISO Loopback Not Working?

Post by darethehair »

[quote="breaker"]OK, I have found a way to help the 32bit ISOs finish booting via GRUB loopback./quote]

Again, great sleuthing! Even though you have found a workaround, though, I still think that this proves that something is broken, and that (I think) you have sufficient info to present this as a formal bug :)

In my mind, though, I still wonder the following:

- does this effect other distros as well?
- is this a known bug, including by the Mint folks?
- is a solution being worked on for the future?
There is nothing more dangerous than a bored cat.
breaker

Re: Linux Mint 13: Grub2 ISO Loopback Not Working?

Post by breaker »

Yes, I wonder if it affects Ubuntu, but I haven't tried it against Ubuntu yet.

I reported it as bug #1013984 in launchpad to the best of my ability at this stage.
breaker

Re: Linux Mint 13: Grub2 ISO Loopback Not Working?

Post by breaker »

I was talking to caribriz, and he said he really can boot the ISO using GRUB and a USB flash drive, but only after he deleted all NTFS partitions from his hard drive!

I will have to try this on an old PC. Or rather, probably temporarily change the partition type to see what happens...
caribriz

Re: Linux Mint 13: Grub2 ISO Loopback Not Working?

Post by caribriz »

breaker wrote:I reported it as bug #1013984 in launchpad to the best of my ability at this stage.
I added a comment below your launchpad report today.
https://bugs.launchpad.net/linuxmint/+bug/1013984

It's quite a long post - I didn't know how else to do it :lol:
Hope it helps.

caribriz
User avatar
karlchen
Level 23
Level 23
Posts: 18222
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: Linux Mint 13: Grub2 ISO Loopback Not Working?

Post by karlchen »

Hello, folks.

Long time has passed since this thread was started.
By now I think the mystery might be clearing up why attempts to perform Mint4win installations of Maya 32-bit editions fail (on NTFS partitions):

The typical error message which I kept on reading and which had been posted e.g. by caribiz here fooled me for quite a time into assuming the casper-lupin or the lupin-support might be broken because the final verdict read
Could not find the ISO /linuxmint-13-cinnamon-dvd-32bit.iso
Cf. [1] and [2]. Yet, this is merely the consequence of the primary problem, a symptom, not the problem itself..

Have a look at the complete error message:
BusyBox v1.18.5 (Ubuntu 1:1.18.5-1ubuntu4) built-in shell (ash)
Enter 'help' for a list of built-in commands.

(initramfs) Begin: Running /scripts/casper-premount ... done.
Begin: ...waiting for devs... ... done.
stdin: error 0
/sbin/mount.ntfs: line 1: ELF: not found
/sbin/mount.ntfs: line 2: : not found
/sbin/mount.ntfs: line3: syntax error: unexpected ")"
mount: mounting /dev/sda7 on /isodevice failed: No such device
Warning: Cannot mount /dev/sda7 on /isodevice

Could not find the ISO /linuxmint-13-cinnamon-dvd-32bit.iso
The real problem is /sbin/mount.ntfs!

Now that I know, I wonder why the heck it has not occurred to me immediately or at minimum much earlier. :oops:

The files /sbin/mount.ntfs and /sbin/mount.ntfs-3g - which are both identical - seem to be 64-bit executables. They should be 32-bit ELF files, as we are talking about the 32-bit editions of Maya.
The file /bin/ntfs-3g, which again is just another copy of the same executable, indeed is a 32-bit executable.
(Yep, indeed there should be the same 32-bit executable under 3 different names, /bin/ntfs-3g, /sbin/mount.ntfs and /sbin/mount.ntfs-3g.)

The fact that 2 of them in fact are 64-bit ELF files instead of 32-bit ELF files, prevents the Mint4win installation from successfully detecting and mounting any NTFS partition. As a consequence, any 32-bit Mint4win installation meant to be done on a NTFS partition is doomed to fail.

Here is how this problem was worked around - not a perfect solution, yet, but it seems to have done the job:

At the Busybox prompt, the following commands were executed:

Code: Select all

/bin/ntfs-3g -o rw,nosuid,nodev,allow-other,default-permissions /dev/sda1 /isodevice
mount -t iso9660 -o loop /isodevice/linuxmint/install/installation.iso /cdrom
The device name /dev/sda1 may vary depending on which partition you are installing to.

Code: Select all

kill <pid of 20isoscan>
This made the installation process continue, yet, it also caused a lot of error messages to be displayed. Therefore this workaround is far from perfect. Yet, it somehow got the job done:
The Maya 32-bit live system got loaded from installation.iso and the installation to root.disk (/dev/loop3) could be launched by clicking on the desktop icon labelled "Install Linux Mint".

In fact, I am typing this from the new Mint4win Maya 32-bit Cinnamon system.

The final and perfect solution will be by fixing the file initrd.lz which Mint4win puts on the Windows target partition and which holds the incorrect 64-bit editions of /sbin/mount.ntfs and /sbin/mount.ntfs-3g.

Hope this helps a bit.

Cheers,
Karl
Image
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 771 days now.
Lifeline
oobetimer

Re: Linux Mint 13: Grub2 ISO Loopback Not Working?

Post by oobetimer »

karlchen wrote: The final and perfect solution will be by fixing the file initrd.lz which Mint4win puts on the Windows target partition and which holds the incorrect 64-bit editions of /sbin/mount.ntfs and /sbin/mount.ntfs-3g.

Hope this helps a bit.

Cheers,
Karl
[This CD] works with mint4win installations .. :wink:

http://forums.linuxmint.com/viewtopic.p ... 66#p600154
breaker

Re: Linux Mint 13: Grub2 ISO Loopback Not Working?

Post by breaker »

karlchen wrote:Hello, folks.

Long time has passed since this thread was started.
By now I think the mystery might be clearing up why attempts to perform Mint4win installations of Maya 32-bit editions fail (on NTFS partitions):

The typical error message which I kept on reading and which had been posted e.g. by caribiz here fooled me for quite a time into assuming the casper-lupin or the lupin-support might be broken because the final verdict read
Could not find the ISO /linuxmint-13-cinnamon-dvd-32bit.iso
Cf. [1] and [2]. Yet, this is merely the consequence of the primary problem, a symptom, not the problem itself..

Have a look at the complete error message:
BusyBox v1.18.5 (Ubuntu 1:1.18.5-1ubuntu4) built-in shell (ash)
Enter 'help' for a list of built-in commands.

(initramfs) Begin: Running /scripts/casper-premount ... done.
Begin: ...waiting for devs... ... done.
stdin: error 0
/sbin/mount.ntfs: line 1: ELF: not found
/sbin/mount.ntfs: line 2: : not found
/sbin/mount.ntfs: line3: syntax error: unexpected ")"
mount: mounting /dev/sda7 on /isodevice failed: No such device
Warning: Cannot mount /dev/sda7 on /isodevice

Could not find the ISO /linuxmint-13-cinnamon-dvd-32bit.iso
The real problem is /sbin/mount.ntfs!

Now that I know, I wonder why the heck it has not occurred to me immediately or at minimum much earlier. :oops:

The files /sbin/mount.ntfs and /sbin/mount.ntfs-3g - which are both identical - seem to be 64-bit executables. They should be 32-bit ELF files, as we are talking about the 32-bit editions of Maya.
The file /bin/ntfs-3g, which again is just another copy of the same executable, indeed is a 32-bit executable.
(Yep, indeed there should be the same 32-bit executable under 3 different names, /bin/ntfs-3g, /sbin/mount.ntfs and /sbin/mount.ntfs-3g.)

The fact that 2 of them in fact are 64-bit ELF files instead of 32-bit ELF files, prevents the Mint4win installation from successfully detecting and mounting any NTFS partition. As a consequence, any 32-bit Mint4win installation meant to be done on a NTFS partition is doomed to fail.

Here is how this problem was worked around - not a perfect solution, yet, but it seems to have done the job:

At the Busybox prompt, the following commands were executed:

Code: Select all

/bin/ntfs-3g -o rw,nosuid,nodev,allow-other,default-permissions /dev/sda1 /isodevice
mount -t iso9660 -o loop /isodevice/linuxmint/install/installation.iso /cdrom
The device name /dev/sda1 may vary depending on which partition you are installing to.

Code: Select all

kill <pid of 20isoscan>
This made the installation process continue, yet, it also caused a lot of error messages to be displayed. Therefore this workaround is far from perfect. Yet, it somehow got the job done:
The Maya 32-bit live system got loaded from installation.iso and the installation to root.disk (/dev/loop3) could be launched by clicking on the desktop icon labelled "Install Linux Mint".

In fact, I am typing this from the new Mint4win Maya 32-bit Cinnamon system.

The final and perfect solution will be by fixing the file initrd.lz which Mint4win puts on the Windows target partition and which holds the incorrect 64-bit editions of /sbin/mount.ntfs and /sbin/mount.ntfs-3g.

Hope this helps a bit.

Cheers,
Karl
Great work!! :D

Earlier, darethehair did point out we were seeing this mounting error, but since I saw it in the casper.log file of a successfully booted LM13 32bit via Syslinux, I didn't think it was the root cause of our loopback boot failure via GRUB, I was wrong. Somehow booting via GRUB, the error stalls the script, but not via Syslinux.

I have been thinking since caribriz said the ntfs partition deletion fixed his booting of the ISO via GRUB, that the attempted mounting of a NTFS partition caused the failure. I too should have tested some manual mounting at busybox, but I was focused on the script which really didn't need to mount anything except the FAT32 flash drive and the ISO! Sure enough I tested mounting at busybox with /sbin/mount.ntfs and it failed with the same message, but /bin/ntfs-3g works.

Now, I just tried to boot the Ubuntu 12.04 32bit Desktop ISO via GRUB loopback, and it worked. Upon closer inspection, the /sbin/mount.ntfs and /sbin/mount.ntfs-3g in the Ubuntu initrd.lz are actually links to the /bin/ntfs-3g file.

So, going back to the Linux Mint 13 32bit ISOs booting via GRUB loopback, I discovered 2 more ways to make them boot:

1) from the busybox breakpoint simply hit ctrl-D (or type exit), you get a mounting error, then hit ctrl-D again, the thing boots (I should have tried this long ago, but live and learn)!
2) Add break=premount to the linux line of your boot menu entry for GRUB, then it will drop you to busybox on purpose before it executes the casper-premount script. Finally delete /sbin/mount.ntfs and /sbin/mount.ntfs-3g, copy /bin/ntfs-3g to /sbin and rename it mount.ntfs, hit CTRL-D, win.

From this point in our work, I think we can make a fix. Just extract initrd.lz as usual, modify it so /sbin has the correct copy of ntfs-3g, repack, then boot it with GRUB pointing to your new initrd, or to get fancy rebuild the ISO, done, win!

Well, let's see if I can do this now...
breaker

Re: Linux Mint 13: Grub2 ISO Loopback Not Working?

Post by breaker »

Yay! I used this guide: https://help.ubuntu.com/community/LiveCDCustomization to modify the Linux Mint 13 MATE 32bit ISO, then recreate it. I even made sure the md5sums.txt was regenerated correctly. I tested booting with Oracle VM Virtualbox, and I booted the ISO using GRUB loopback no problem! I call it 32win instead of 32bit, lol. Please test mint4win.

Torrent up on some open trackers. MD5 of ISO: 0836f8fb598ca5e59dd12c818441186c

Want Cinnamon?
User avatar
karlchen
Level 23
Level 23
Posts: 18222
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: Linux Mint 13: Grub2 ISO Loopback Not Working?

Post by karlchen »

Hi, breaker.

Great job. :)
And to be honest: it was your post here in this thread where you made mint4win succeed by redirecting everything to a FAT32 (vfat) USB drive which finally made me realize that mount.ntfs had to the source of all troubles.

Cheers,
Karl
Image
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 771 days now.
Lifeline
User avatar
darethehair
Level 4
Level 4
Posts: 239
Joined: Sun Mar 08, 2009 2:22 pm
Location: Morden Manitoba Canada
Contact:

Re: Linux Mint 13: Grub2 ISO Loopback Not Working?

Post by darethehair »

Great work guys, and special thanks to breaker for the custom ISO!

Now I hope the Mint guys have been watching this thread and will take what has been learned here into account for future releases of our favorite distros :)
There is nothing more dangerous than a bored cat.
caribriz

Re: Linux Mint 13: Grub2 ISO Loopback Not Working?

Post by caribriz »

Well done breaker and karlchen! :)
Great effort to nut out this problem!
darethehair wrote:Now I hope the Mint guys have been watching this thread and will take what has been learned here into account for future releases of our favorite distros :)
+1

caribriz
breaker

Re: Linux Mint 13: Grub2 ISO Loopback Not Working?

Post by breaker »

Yes.

Hey the trackers I used are UDP, and I noticed on Linux Mint 9, transmission doesn't support those kind. However, Deluge does.

I want to do the Cinnamon ISO also, but I have to go out of town for a few, so I'll catch it when I return!

EDIT: I'm sure everything works, but if someone would independently verify the test of mint4win from the LM13 MATE ISO I posted, then report back, I would appreciate it, thanks!
oobetimer

Re: Linux Mint 13: Grub2 ISO Loopback Not Working?

Post by oobetimer »

breaker wrote:Yay! I used this guide: https://help.ubuntu.com/community/LiveCDCustomization to modify the Linux Mint 13 MATE 32bit ISO, then recreate it. I even made sure the md5sums.txt was regenerated correctly. I tested booting with Oracle VM Virtualbox, and I booted the ISO using GRUB loopback no problem! I call it 32win instead of 32bit, lol. Please test mint4win.

Torrent up on some open trackers. MD5 of ISO: 0836f8fb598ca5e59dd12c818441186c

Want Cinnamon?
No one is seeding .. :(
User avatar
darethehair
Level 4
Level 4
Posts: 239
Joined: Sun Mar 08, 2009 2:22 pm
Location: Morden Manitoba Canada
Contact:

Re: Linux Mint 13: Grub2 ISO Loopback Not Working?

Post by darethehair »

oobetimer wrote:No one is seeding .. :(
I seeded for a few days. I'll try to do so for a few more :) I wish this was 'official' so that the whole community could be involved!
There is nothing more dangerous than a bored cat.
oobetimer

Re: Linux Mint 13: Grub2 ISO Loopback Not Working?

Post by oobetimer »

darethehair wrote:
oobetimer wrote:No one is seeding .. :(
I seeded for a few days. I'll try to do so for a few more :) I wish this was 'official' so that the whole community could be involved!
It seems that it is better to forget these unofficial torrents .. :lol:
Locked

Return to “Installation & Boot”