You are not logged in.

#1 2012-12-28 22:26:44

wolfo9999
Member
Registered: 2012-11-27
Posts: 19

How to write Arch Install ISO to a hard drive partition?

I used dd to write the ISO to /dev/sda5 on my hard drive, but when I try to boot the partition, It says it cannot find isolinux.bin even though it is on /dev/sda5. Is there a way to either make the ISO work from /dev/sda5, or emulate the .iso file from the partition used to boot it?

Offline

#2 2012-12-28 22:34:51

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,452
Website

Re: How to write Arch Install ISO to a hard drive partition?

I'm not sure if you can write the iso as-is to a partition.  If you wanted you could write it to a disk (sda instead of sda5) but then you'd lose any other partitions and you would have quite a bit of unused space.

Why would you want to do this?  Just install.

EDIT: you can just save the iso as a file on a disk.  I believe syslinux may have a way to boot an iso file ... I could be wrong, I only have a vague memory of seeing this in some documentation and ignoring as I had no interest in doing it.

Last edited by Trilby (2012-12-28 22:36:14)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2012-12-28 22:37:54

wolfo9999
Member
Registered: 2012-11-27
Posts: 19

Re: How to write Arch Install ISO to a hard drive partition?

I want it on my hard drive so incase I need the recovery functionality of the disk I dont have to bring around a CD

Offline

#4 2012-12-28 22:38:18

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

Re: How to write Arch Install ISO to a hard drive partition?

Do you want such setup just for some challenge?

Otherwise:

bsdtar -x --exclude=isolinux/ --exclude=EFI/ --exclude=loader/ -f ~/archlinux-2012.12.01-dual.iso -C /mnt/sda5
extlinux -i /mnt/sda5/arch/boot/syslinux

then chainload it.

Edit: /dev/sda5 should be extfs/btrfs/vfat/ntfs with fs-label ARCH_201212

Last edited by djgera (2012-12-28 22:40:23)

Offline

#5 2012-12-28 22:43:23

roentgen
Member
Registered: 2011-03-15
Posts: 91

Re: How to write Arch Install ISO to a hard drive partition?

Is your intention to boot from there as a rescue medium? If so, I managed to do this by *extracting* the iso into /boot/arch and putting the following in syslinux.cfg

LABEL archiso
  TEXT HELP
    Boot the Arch Linux (x86_64) live medium. It allows you to install
    Arch Linux or perform system maintenance.
  ENDTEXT
  MENU LABEL ArchISO
  CONFIG /arch/boot/syslinux/archiso.cfg
  APPEND /arch/

I remember I also modified some of the syslinux files *inside* de iso but I can't tell for sure right now.

Offline

#6 2012-12-28 22:45:05

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,452
Website

Re: How to write Arch Install ISO to a hard drive partition?

Just put it on a usb - suitable pen drives are dirt cheap now.

Considering that most of the things you would need to "recover" from would make sda5 just as unbootable as your main install, this would hardly serve the purpose of a recovery disk anyways.

Last edited by Trilby (2012-12-28 22:46:25)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#7 2012-12-28 23:01:04

wolfo9999
Member
Registered: 2012-11-27
Posts: 19

Re: How to write Arch Install ISO to a hard drive partition?

The idea for this extra recovery partition was when I rebuild my kernel when adding hibernate support. mkinitcpio gave some nasty errors and when I rebooted, my kernels were completely broken, so no way to rebuild them without the live-cd, which magically rebuilded my kernel with zero errors.

The whole point of doing this is so I don't have to carry around a USB stick or a CD. Just have it on my hard disk.

When I tried to chain load /dev/sda5 I got this error:

No configuration file found.
No DEFAULT or UI configuration directive found!
boot: _

Does that mean I have to copy a new syslinux.cfg to the partition? Or does that mean I did something wrong

Offline

#8 2012-12-28 23:03:42

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,452
Website

Re: How to write Arch Install ISO to a hard drive partition?

why not just have a second minimal install on sda5 then?


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#9 2012-12-28 23:06:52

wolfo9999
Member
Registered: 2012-11-27
Posts: 19

Re: How to write Arch Install ISO to a hard drive partition?

^ genius. Can't believe I didn't think of that.

Offline

#10 2012-12-28 23:26:09

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,131

Re: How to write Arch Install ISO to a hard drive partition?

Grub can also boot the isos directly. I've tried to set a couple up though the only one which currently works is the Arch iso.

Basically, I have the iso at /boot/isos/archlinux-2012.09.07-dual.iso. (Note: I may have modified the iso to EFI but can't remember if this was necessary.)

In grub.cfg:

menuentry "Archlinux-2012.09.07-dual.iso" {
        insmod loopback
        set isofile="/isos/archlinux-2012.09.07-dual.iso"
        loopback loop (${_arch64_boot})$isofile
        echo    'Llwytho Arch Linux 2012.09.07 ISO ar MyComputerName ...'
        linux (loop)/arch/boot/x86_64/vmlinuz archisolabel=ARCH_201209 img_dev=/dev/disk/by-uuid/${_boot_part_gpt_guid} img_loop=$isofile
        echo    'Llwytho iso image ...'
        initrd (loop)/arch/boot/x86_64/archiso.img
}

Then I have an entry for grub in the EFI boot manager and also in rEFInd (which has the default entry in the EFI boot manager).

I can't get SystemRescueCd to work, though.

Note: The Welsh loading messages are, of course, entirely optional... (All my grub entries are like this - I only wish I could figure out how to do it for rEFInd!)

Note 2: Welsh is not guaranteed to be correct or, even, intelligible. Provided as is.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#11 2012-12-28 23:37:27

wolfo9999
Member
Registered: 2012-11-27
Posts: 19

Re: How to write Arch Install ISO to a hard drive partition?

Does syslinux support ISO loading?

Offline

#12 2012-12-29 01:31:29

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: How to write Arch Install ISO to a hard drive partition?

I made my two SSDs raid0, so I was left with an empty 512MB partition on the second drive because I could not raid the efi system partition.  So I stuck the install disc on these.  I used djgera's method of simply extracting the contents to the partition.  Since I use uefi, I marked the partition as ef00 (EFI System) and formatted it as FAT32.  So it was actually just a secondary ESP.  So if I just chose to boot from that disk, it would boot right into gummiboot.  I could also do it from the shell, or I could have created an efibootmgr entry.

If you don't have uefi though, you can still extract the contents to the filesystem of your choice, and then install isolinux to the partiton superblock.  Then chainload to it (which has already been explained by djgera above).

Offline

#13 2012-12-29 12:35:45

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,494

Re: How to write Arch Install ISO to a hard drive partition?

WonderWoofy wrote:

I made my two SSDs raid0, so I was left with an empty 512MB partition on the second drive.

I like this method, would it also be possible to do if you have only 1 EF00 partition of 3GB? I have that!
Extract the content of arch-iso to that partition I mean.)

At the moment I use the method cfr uses, but whitout 'echo'

menuentry "Archlinux-2012.12-01-dual.iso" {
    set isofile="/isoos/archlinux-2012.12.01-dual.iso"
    loopback loop (hd1,5)$isofile
    linux (loop)/arch/boot/x86_64/vmlinuz archisolabel=ARCH_201212 img_dev=/dev/sdb5 img_loop=$isofile earlymodules=loop
    initrd (loop)/arch/boot/x86_64/archiso.img
}

@cfr: I also have tried to get SystemRescueCd to work, extracted it followed the path's correctly but still no luck.(
what advantage does 'echo' have in this case?

Offline

#14 2012-12-29 14:22:53

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,131

Re: How to write Arch Install ISO to a hard drive partition?

The "echo" just tells me what it is doing - same as in other grub entries. So if it fails, I know which step it is failing on. It is entirely cosmetic otherwise.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#15 2012-12-29 16:54:39

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,494

Re: How to write Arch Install ISO to a hard drive partition?

cfr wrote:

The "echo" just tells me what it is doing - same as in other grub entries. So if it fails, I know which step it is failing on. It is entirely cosmetic otherwise.

Thats nice I like notifications, but won't the stages (1, 1.5 ,2) notify you?
I looked around and couldn't find any useful info on 'echo' for grub

Mind sharing?... thanks.)

Offline

#16 2012-12-30 05:04:09

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: How to write Arch Install ISO to a hard drive partition?

qinohe wrote:

Thats nice I like notifications, but won't the stages (1, 1.5 ,2) notify you?
I looked around and couldn't find any useful info on 'echo' for grub
Mind sharing?... thanks.)

Yes you can do this.  I thought about doing this first, but figured since I had that unused space, i would use that instead.  3GB is waaaayyyy more than enough space.  The ISO only really requires <500MB, so with the needed space for efi applications/kernels/initramfs' you have that covered for sure.

You may want to backup the contents of your ESP, extract, and then replace the stuffs that was there to being with.  Then I would recommend using gummiboot that the installer already uses, as all you would have to do is add entries in \EFI\loader\entries.  I use gummiboot anyway, and it is pretty great.  I really like the simplicity w/o the loss of functionlity.  Though on these forums, Rod Smith has mentioned adding ext4 compatibility in his rEFInd bootmanager.  Meaning you would not have to keep kernels on the ESP.

Edit: fixed quote... apparently I am a crappy copy/paster.

Last edited by WonderWoofy (2012-12-30 15:52:58)

Offline

#17 2012-12-30 14:33:11

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,494

Re: How to write Arch Install ISO to a hard drive partition?

WonderWoofy wrote:
qinohe wrote:

This page contains the following errors:

error on line 271 at column 117: Opening and ending tag mismatch: span line 0 and strong
Below is a rendering of the page up to the first error.

Yes you can do this.  I thought about doing this first, but figured since I had that unused space, i would use that instead.  3GB is waaaayyyy more than enough space.  The ISO only really requires <500MB, so with the needed space for efi applications/kernels/initramfs' you have that covered for sure.

You may want to backup the contents of your ESP, extract, and then replace the stuffs that was there to being with.  Then I would recommend using gummiboot that the installer already uses, as all you would have to do is add entries in \EFI\loader\entries.  I use gummiboot anyway, and it is pretty great.  I really like the simplicity w/o the loss of functionlity.  Though on these forums, Rod Smith has mentioned adding ext4 compatibility in his rEFInd bootmanager.  Meaning you would not have to keep kernels on the ESP.

Thanks. that is good news.) When I build the partition I choose for this large because I wanted to do 'creative' things with it in the future. Like putting install images on it, or your own iso, or some check programs. Since it is a 128GB ssd I only use for Arch, 3GB is not much.

Right now Grub2 is installed with efibootmgr, and I must say!, never had any problems with it (tap on wood:). Everything works fine, adding images, graphical menu, So I don't know if I (should) change a winning horse.) But I will definitely try your method in a vbox, maybe it works nicer, cleaner, will look into rEFInd.

P.S. the quote is not mine but it's rEnr3n's

Last edited by qinohe (2012-12-30 14:42:38)

Offline

#18 2012-12-30 16:00:54

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: How to write Arch Install ISO to a hard drive partition?

Sorry qinohe, I fixed the quote.  Apparently I kind of suck at copying and/or pasting.

Recently I tried the archiso scripts to create my own live media.  I was really suprised at how amazingly simple it was.  And I was also able to only create the x86_64 part, since I am booting with UEFI only, the i686 part was just totally useless in my case.  So I was then able to install a decent amount of other tools I find useful and the image was still significantly smaller than with the dual official iso.

At first I thought that I should simply create a minimal install and then use that, but I really like the idea of having a squashfs that you totally cannot f*ck up because it is ro.  My only issue was that because I used releng (see the archiso wiki page), it insisted on making an autologin@tty1.service, so even though I applied a different passwd/shadow it did me no good because it would bypass the need for password entry anyway.

Offline

#19 2012-12-30 18:59:42

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,131

Re: How to write Arch Install ISO to a hard drive partition?

qinohe wrote:
cfr wrote:

The "echo" just tells me what it is doing - same as in other grub entries. So if it fails, I know which step it is failing on. It is entirely cosmetic otherwise.

Thats nice I like notifications, but won't the stages (1, 1.5 ,2) notify you?
I looked around and couldn't find any useful info on 'echo' for grub

Mind sharing?... thanks.)

I don't know anything about "stages" - sorry. As for echo, I just copied this from the standard entries I had in grub.cfg for Arch etc. That said, I'm not using grub-mkconfig but maintain the file myself. However, the autogenerated config certainly used to use echo to post messages.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#20 2012-12-30 19:43:12

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,494

Re: How to write Arch Install ISO to a hard drive partition?

WonderWoofy wrote:

Sorry qinohe, I fixed the quote.  Apparently I kind of suck at copying and/or pasting.

That does it, you had your share of quotes for today. lol
Just kidding, the one U use now is addressed to cfr.

WonderWoofy wrote:

Recently I tried the archiso scripts to create my own live media.  I was really suprised at how amazingly simple it was.  And I was also able to only create the x86_64 part, since I am booting with UEFI only, the i686 part was just totally useless in my case.  So I was then able to install a decent amount of other tools I find useful and the image was still significantly smaller than with the dual official iso.

At first I thought that I should simply create a minimal install and then use that, but I really like the idea of having a squashfs that you totally cannot f*ck up because it is ro.  My only issue was that because I used releng (see the archiso wiki page), it insisted on making an autologin@tty1.service, so even though I applied a different passwd/shadow it did me no good because it would bypass the need for password entry anyway.

But I get the point;), this kind of things I like to do,  made USB x86_64-UEFI so maybe I use that one.
2nd Yeah, it squashfs saved me already, very handy!
3th You use pxe boot method?

cfr wrote:

I don't know anything about "stages" - sorry. As for echo, I just copied this from the standard entries I had in grub.cfg for Arch etc. That said, I'm not using grub-mkconfig but maintain the file myself. However, the autogenerated config certainly used to use echo to post messages.

Ah yes, I do use grub2, in my case, it doesn't auto generate this 'echo' line... thanks.)

OP, I don't want to hijack your thread, sorry if it looks like that.(, but I really like this 'matter';)

Offline

#21 2012-12-30 21:13:34

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: How to write Arch Install ISO to a hard drive partition?

Yes, I just realized I cpoied and pasted the wrong one again.... I quit, I'm not fixing it, else I might just quote another wrong post. 

No I don't use pxe.

Offline

Board footer

Powered by FluxBB