You are not logged in.

#1 2011-08-27 19:45:22

billyburly
Member
Registered: 2011-08-27
Posts: 8

boot 2011.08.19 installation media from grub2 via loopback

I have been trying to get the new installation media to boot from grub2 using loopback. The kernel and ramdisk load fine but it fails when it gets to the loopback mounting hook. I receive the following error message:

::Setup a loop device from iso/archlinux-2011.08.19-core-dual.iso located at device /dev/disk/by-label/MULTIBOOT
losetup: /dev/loop0: No suck file or directory

It then tries booting of of a CD, fails, and throws me to the minimal shell.

Has anyone gotten loopback booting of the install media working?

My grub2 entries are:

set drive_label=MULTIBOOT

menuentry "ArchLinux 2011.08.19 i686" {
  set isofile="iso/archlinux-2011.08.19-core-dual.iso"
  loopback loop /$isofile
  echo 'loading kernel...'
  linux (loop)/arch/boot/i686/vmlinuz lang=en locale=en_US.UTF-8 ramdisk_size=75% img_dev=/dev/disk/by-label/$drive_label img_loop=$isofile
  echo 'loading ramdisk...'
  initrd (loop)/arch/boot/i686/archiso.img
}

menuentry "ArchLinux 2011.08.19 x86_64" {
  set isofile="iso/archlinux-2011.08.19-core-dual.iso"
  loopback loop /$isofile
  echo 'loading kernel...'
  linux (loop)/arch/boot/x86_64/vmlinuz lang=en locale=en_US.UTF-8 ramdisk_size=75% img_dev=/dev/disk/by-label/$drive_label img_loop=$isofile
  echo 'loading ramdisk...'
  initrd (loop)/arch/boot/x86_64/archiso.img
}

Last edited by billyburly (2011-08-27 19:48:24)

Offline

#2 2011-08-27 19:51:11

djgera
Developer
From: Buenos Aires - Argentina
Registered: 2008-12-24
Posts: 723
Website

Re: boot 2011.08.19 installation media from grub2 via loopback

Yes, its a bug, and fixed recently [#1]

To workaround, in ramfs prompt type:

losetup -d /dev/loop0 /dev/disk/by-label/MULTIBOOT/iso/archlinux-2011.08.19-core-dual.iso
exit

[#1] http://projects.archlinux.org/archiso.g … ae8fa3607c

Offline

#3 2011-08-27 20:08:07

djgera
Developer
From: Buenos Aires - Argentina
Registered: 2008-12-24
Posts: 723
Website

Re: boot 2011.08.19 installation media from grub2 via loopback

If you want a definitive fix, you can regenerate the initramfs image in easy steps:

mkdir archiso
cd archiso
lsinitcpio -x /path/to/on/your/disk/archiso.img
wget "http://projects.archlinux.org/archiso.git/patch/?id=219b43a0bf8ef65c4edc1516f1a408ae8fa3607c" -O archiso.patch
patch -p2 < archiso.patch
rm archiso.patch
find . -print0 | bsdcpio -0oH newc | xz --check=crc32 > /path/to/on/your/disk/archiso.img
cd ..
rm -r archiso

Last edited by djgera (2011-08-27 20:08:30)

Offline

#4 2011-08-27 20:10:47

djgera
Developer
From: Buenos Aires - Argentina
Registered: 2008-12-24
Posts: 723
Website

Re: boot 2011.08.19 installation media from grub2 via loopback

ramdisk_size=75% this option does nothing, future archiso will support img_label=[#1] wink and persistent dm-snapshot devices.

[#1] https://github.com/djgera/archiso/commi … 52158a30c4

Offline

#5 2011-08-27 20:49:31

billyburly
Member
Registered: 2011-08-27
Posts: 8

Re: boot 2011.08.19 installation media from grub2 via loopback

thanks for the help. couldnt find a fix. only found year or two old thread from before loopback was added.

Offline

#6 2011-08-27 22:56:02

djgera
Developer
From: Buenos Aires - Argentina
Registered: 2008-12-24
Posts: 723
Website

Re: boot 2011.08.19 installation media from grub2 via loopback

You are welcome.

Oh, but in your case you also need to remaster iso. (I was think when I test these things directly with qemu, passing arguments -kernel/-initrd/-append tongue)

mkdir -p /tmp/archlinux/{mnt,iso}
mount /path/to/your/archlinux-2011.08.19-core-dual.iso /tmp/archlinux/mnt
cp -a /tmp/archlinux/mnt/* /tmp/archlinux/iso
umount /tmp/archlinux/mnt

Now repack initramfs in /tmp/archlinux/iso/arch/boot/{i686,x86_64}/archiso.img

cd /tmp/archlinux/iso/arch
find -type f ! -name checksum.md5 -print0 | xargs -0 md5sum > checksum.md5
mkisofs -r -l \
    -b isolinux/isolinux.bin -c isolinux/boot.cat \
    -uid 0 -gid 0 \
    -udf -allow-limited-size -iso-level 3 \
    -input-charset utf-8 -p "prepared by mkarchiso" \
    -no-emul-boot -boot-load-size 4 -boot-info-table \
    -publisher "Arch Linux <http://www.archlinux.org>" \
    -A "Arch Linux Live/Rescue CD" \
    -V "ARCH_201108" \
    -o "/tmp/archlinux/archlinux-2011.08.19-core-dual.iso" "/tmp/archlinux/iso"
isohybrid "/tmp/archlinux/archlinux-2011.08.19-core-dual.iso"
cd /tmp
rm -r /tmp/archlinux/iso

Good Luck.

Last edited by djgera (2011-08-27 23:02:20)

Offline

#7 2011-08-28 05:52:39

billyburly
Member
Registered: 2011-08-27
Posts: 8

Re: boot 2011.08.19 installation media from grub2 via loopback

Thanks very much. This almost worked.

It seems even after the loopback kernel parameters I still needed to set archisolabel=ARCH_201108 as well, otherwise it would fail.

So my grub2 entries (with patched iso) are:

set drive_label=MULTIBOOT

menuentry "ArchLinux 2011.08.19 i686" {
  set isofile="iso/archlinux-2011.08.19-core-dual.iso"
  loopback loop /$isofile
  echo 'loading kernel...'
  linux (loop)/arch/boot/i686/vmlinuz lang=en locale=en_US.UTF-8 img_dev=/dev/disk/by-label/$drive_label img_loop=$isofile archisolabel=ARCH_201108
  echo 'loading ramdisk...'
  initrd (loop)/arch/boot/i686/archiso.img
}

menuentry "ArchLinux 2011.08.19 x86_64" {
  set isofile="iso/archlinux-2011.08.19-core-dual.iso"
  loopback loop /$isofile
  echo 'loading kernel...'
  linux (loop)/arch/boot/x86_64/vmlinuz lang=en locale=en_US.UTF-8 img_dev=/dev/disk/by-label/$drive_label img_loop=$isofile archisolabel=ARCH_201108
  echo 'loading ramdisk...'
  initrd (loop)/arch/boot/x86_64/archiso.img
}

Willl ArchLinux be releasing an updated installation media iso, since the released one had a bug? Or will the next release be a year off, like the previous iteration?

Offline

#8 2011-08-28 06:16:54

djgera
Developer
From: Buenos Aires - Argentina
Registered: 2008-12-24
Posts: 723
Website

Re: boot 2011.08.19 installation media from grub2 via loopback

Good, yes, you always need archisolabel= or archisodevice=.

About new snapshot, I do not know. I am only contribute to archiso project, keeping it up-to-date and adding features.

I think will be a good idea to make another snapshot in about one month. You can ask in arch-releng ML. wink

Offline

#9 2011-12-11 20:32:49

garegin
Member
Registered: 2011-11-20
Posts: 5

Re: boot 2011.08.19 installation media from grub2 via loopback

losetup -d /dev/loop0 /dev/disk/by-label/MULTIBOOT/iso/archlinux-2011.08.19-core-dual.iso doesn't work. its the wrong syntax apparently. according to the syntax you can only put losetup -d loopname, you can't put a filename. and when you put /dev/loop0 is says that it doesnt exist, even though losetup shows that it does.

Offline

#10 2011-12-12 03:18:16

djgera
Developer
From: Buenos Aires - Argentina
Registered: 2008-12-24
Posts: 723
Website

Re: boot 2011.08.19 installation media from grub2 via loopback

just add earlymodules=loop as bootparam to workaround this issue.

Offline

#11 2011-12-12 15:50:48

garegin
Member
Registered: 2011-11-20
Posts: 5

Re: boot 2011.08.19 installation media from grub2 via loopback

move this post to a new thread if you feel like.
a constructive criticism. the partitioning on the arch installer sucks b****. its unintuitive and clumsy. when its gives you the option of three different partitions you can't easily say that you want just one partition. the partitioning in other text installs are much better. be it ubuntu, fedora, debian or opensuse.

Offline

#12 2011-12-12 15:57:03

djgera
Developer
From: Buenos Aires - Argentina
Registered: 2008-12-24
Posts: 723
Website

Re: boot 2011.08.19 installation media from grub2 via loopback

garegin wrote:

move this post to a new thread if you feel like.
a constructive criticism. the partitioning on the arch installer sucks b****. its unintuitive and clumsy. when its gives you the option of three different partitions you can't easily say that you want just one partition. the partitioning in other text installs are much better. be it ubuntu, fedora, debian or opensuse.

Fill a bug report/feature request for AIF on https://bugs.archlinux.org/index.php?project=6

Offline

#13 2011-12-31 16:06:08

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,637
Website

Re: boot 2011.08.19 installation media from grub2 via loopback

Been reading through this and other threads on the topic.  I too would like to boot from grub2 to a hdd-bound arch iso.  Has any progress been made such that one does not need to remaster the iso?  If so, please add section to the grub2 wiki article perhaps under the one I wrote describing how to do the same with an ubuntu iso:

https://wiki.archlinux.org/index.php/Gr … UB2_Screen


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

Board footer

Powered by FluxBB