[Bug 684280] Re: casper toram forgets to disconnect loop device

2024-04-04 Thread scmarko
This should be fixed, because when you boot an ISO file from your hard
drive and load Ubuntu to RAM, you are not able to do any repartitioning,
installing etc to the hard drive from where the ISO was loaded from when
it stays mounted. I have tested this on a Ubuntu installation with LVM
hard drive and once I applied the changes to the initrd file of the
Ubuntu ISO, then I was able to successfully run the following commands:

losetup -d /dev/loop0
umount /isodevice

After that I was able to repartition the hard drive and install Ubuntu
from RAM to hard drive. But this adds too much complexity to the end
user if needing to unpack the ISO file and then modify initrd if needing
to use Ubuntu like this.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/684280

Title:
  casper toram forgets to disconnect loop device

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/casper/+bug/684280/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 684280] Re: casper toram forgets to disconnect loop device

2021-11-23 Thread Paul Wierzbicki
Issue is still occurring on ubuntu-20.04.3-live-server-amd64.

Unfortunately having difficulty unmounting the iso file with the
following two commands,

losetup -d /dev/loop0
umount /isodevice

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/684280

Title:
  casper toram forgets to disconnect loop device

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/casper/+bug/684280/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 684280] Re: casper toram forgets to disconnect loop device

2021-03-10 Thread Jerzy Luszawski
When booting Kubuntu 20.04.1 (LTS) iso the workaround of detaching
/dev/loop0 device and then unmounting /isodevice was required, as in
comment #27. Then setup finished.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/684280

Title:
  casper toram forgets to disconnect loop device

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/casper/+bug/684280/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 684280] Re: casper toram forgets to disconnect loop device

2020-09-30 Thread Michel-Ekimia
** Description changed:

  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 -lfd /isodevice
+ 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

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/684280

Title:
  casper toram forgets to disconnect loop device

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/casper/+bug/684280/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 684280] Re: casper toram forgets to disconnect loop device

2020-09-30 Thread Michel-Ekimia
Just an Update : umount -lfd was not enough

So I'm trying to embed a startup script in a Live custom ISO :


losetup -d /dev/loop0
umount -lfd /isodevice


And it works

** Description changed:

  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:
+ 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 ==
  
- ==Solution =
+ == Workaround =
  
  After casper copy to ram , it need to disconnect the loop device and
  unmount
  
+ 
+ losetup -d /dev/loop0
  umount -lfd /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

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/684280

Title:
  casper toram forgets to disconnect loop device

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/casper/+bug/684280/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 684280] Re: casper toram forgets to disconnect loop device

2020-08-10 Thread Michel-Ekimia
Still on 20.04.1 ...

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/684280

Title:
  casper toram forgets to disconnect loop device

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/casper/+bug/684280/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 684280] Re: casper toram forgets to disconnect loop device

2020-03-10 Thread Michel-Ekimia
Any update on this small but big win fix ?

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/684280

Title:
  casper toram forgets to disconnect loop device

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/casper/+bug/684280/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 684280] Re: casper toram forgets to disconnect loop device

2020-02-14 Thread Michel-Ekimia
Even better option of umount : -d ( detach loop devices )

So sudo umount -lfd /isodevice

should be the way.

** Description changed:

  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 ==
  
  ==Solution =
  
  After casper copy to ram , it need to disconnect the loop device and
  unmount
  
- losetup -d /dev/loop0 ( ID to be verified with losetup -a before )
- 
- umount /isodevice
- 
+ umount -lfd /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

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/684280

Title:
  casper toram forgets to disconnect loop device

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/casper/+bug/684280/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 684280] Re: casper toram forgets to disconnect loop device

2020-02-14 Thread Michel-Ekimia
Did you try to force umount at line

https://git.launchpad.net/ubuntu/+source/casper/tree/scripts/casper?h=ubuntu
/focal-devel#n200

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/684280

Title:
  casper toram forgets to disconnect loop device

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/casper/+bug/684280/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 684280] Re: casper toram forgets to disconnect loop device

2020-02-14 Thread Michel-Ekimia
** Tags removed: maverick
** Tags added: bionic focal

** Description changed:

  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 ==
  
+ ==Solution =
+ 
+ After casper copy to ram , it need to disconnect the loop device and
+ unmount
+ 
+ losetup -d /dev/loop0 ( ID to be verified with losetup -a before )
+ 
+ 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

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/684280

Title:
  casper toram forgets to disconnect loop device

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/casper/+bug/684280/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 684280] Re: casper toram forgets to disconnect loop device

2019-10-25 Thread Charles Wilkins via ubuntu-bugs
Regarding comment #20, 2019-10-03,

I tried this patch and  umount -d ${copyfrom} seems like it should
unmount the loopback device, but it does not.

Yet this works:

root@xubuntu:~# losetup -d /dev/loop0
root@xubuntu:~# umount /isodevice

I am still looking that this, but was curious if anybody else is
experiencing the same issue when booting a recent live iso from disk.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/684280

Title:
  casper toram forgets to disconnect loop device

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/casper/+bug/684280/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 684280] Re: casper toram forgets to disconnect loop device

2019-10-03 Thread Filip
Here's a patch for casper to delete the loopback after copying:

diff --git a/scripts/casper b/scripts/casper
index 5861ced..fa06c0d 100644
--- a/scripts/casper
+++ b/scripts/casper
@@ -191,7 +191,7 @@ copy_live_to() {
 if [ -e ${copyfrom}/.disk ]; then
 cp -a ${copyfrom}/.disk ${copyto}
 fi
-umount ${copyfrom}
+umount -d ${copyfrom}
 mount -r -o move ${copyto} ${copyfrom}
 rmdir ${copyto}
 return 0

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/684280

Title:
  casper toram forgets to disconnect loop device

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/casper/+bug/684280/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 684280] Re: casper toram forgets to disconnect loop device

2018-07-06 Thread Phillip Susi
Yes; the install only fails if the iso file is on your hard disk.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/684280

Title:
  casper toram forgets to disconnect loop device

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/casper/+bug/684280/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 684280] Re: casper toram forgets to disconnect loop device

2018-07-02 Thread Daniel Richard G.
Philip Susi: Confirmed with the Bionic live CD:

root@xubuntu:~# cat /proc/cmdline 
BOOT_IMAGE=(loop)/casper/vmlinuz boot=casper 
iso-scan/filename=/linux/xubuntu-18.04-desktop-amd64.iso toram

root@xubuntu:~# umount /isodevice 
umount: /isodevice: target is busy.

root@xubuntu:~# losetup -d /dev/loop0

root@xubuntu:~# umount /isodevice 
(succeeds)

However, I did not observe the issue as originally reported; Ubiquity
was able to install the system even with /isodevice mounted and unable
to be unmounted. (In my case, the ISO file was on a USB thumbdrive, and
I installed to a hard drive.)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/684280

Title:
  casper toram forgets to disconnect loop device

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/casper/+bug/684280/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs