[Bug 684280] Re: casper toram forgets to disconnect loop device
scmarko
684280 at bugs.launchpad.net
Fri Sep 13 08:42:28 UTC 2024
I'm using the "toram" option to start Ubuntu based installations from
already existing installations directly from the hard drive. Reasons for
that is that I want to be able to perform a clean installation by
completely wiping the hard drive after the ISO has been loaded into RAM.
For example, if there is Ubuntu 16 installed and I want to install
Ubuntu 22, then I can set grub to use the boot to RAM option, erase the
hard drive and then do the installation.
This way it is possible to start an installation from a remote location
without having an USB stick or DVD/CD-ROM drive.
Sometimes I need to help people to upgrade their Linux systems and I
usually have remote access to their desktops, so I can upload an
installation ISO file to their hard drives. Then I configure grub to
boot ISO into RAM. After that I can either instruct the user how to
finalize the installation or in some cases, I have used a custom
installer that performs the installation automatically.
So there are many cases when it is necessary to boot ISO to RAM and
having possibility unmount the hard drive.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to casper in Ubuntu.
https://bugs.launchpad.net/bugs/684280
Title:
casper toram forgets to disconnect loop device
Status in casper package in Ubuntu:
Fix Released
Status in Baltix:
Invalid
Bug description:
Binary package hint: ubiquity
Ubiquity cannot install if you are booting LiveCD directly from ISO.
Booting directly from GRUB to the ISO, mounts the ISO to /isodevice.
Ubiquity will not install (even if on separate disk) if this is not
unmounted.
The result being that one cannot install Ubuntu in this method.
This method can be used to create a recovery partition or a multi-usb
bootable drive. For more explanation on how to do this:
========== START ==========
* Run the following commands which will create the directory
/boot/iso and download the iso file to that directory.
$ sudo -s
# mkdir /boot/iso
# cd /boot/iso
# wget http://releases.ubuntu.com/maverick/ubuntu-10.10-desktop-i386.iso
* Add a custom menu entry in GRUB2 configuration file. Edit
/etc/grub.d/40_custom as root to look like this:
#!/bin/sh
echo "Adding 40_custom." >&2
exec tail -n +3 $0
menuentry "Maverick CD Image ISO" {
set isofile=/boot/iso/ubuntu-10.10-desktop-i386.iso
loopback loop (hd0,1)$isofile
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile noprompt noeject
initrd (loop)/casper/initrd.lz
}
* Afterwards, run update-grub for the changes to be propagated to
/boot/grub/grub.cfg
# update-grub
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-...
Found initrd image: /boot/initrd.img-...
========== STOP ==========
================== Workaround =================
After casper copy to ram , it need to disconnect the loop device and
unmount
losetup -d /dev/loop0
umount /isodevice
===========================================
The result of booting from the ISO directly from GRUB, is that the CD
is that the partition where the ISO is located is mounted to
/isodevice.
Ubiquity seems to want to have control of all disks and unmount all
disks before it starts installing. In the images here you see the
example is sda2 for / and sda for the MBR. I have also tried this with
a secondary disk where sdb1 was to be used for / and sdb for the MBR
and ubiquity still complained that it had to to unmount /isodevice,
even though it is on sda1. Doesn't make much sense to unmount a disk
if you will not be editing any part of it.
ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: ubiquity 2.4.8
ProcVersionSignature: Ubuntu 2.6.35-22.33-generic 2.6.35.4
Uname: Linux 2.6.35-22-generic i686
NonfreeKernelModules: wl
Architecture: i386
Date: Thu Dec 2 16:34:42 2010
LiveMediaBuild: Ubuntu 10.10 "Maverick Meerkat" - Release i386 (20101007)
ProcEnviron:
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: ubiquity
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/casper/+bug/684280/+subscriptions
More information about the foundations-bugs
mailing list