You are not logged in.

#1 2015-10-26 05:22:23

BLizgreat!
Resident Babbler - vll!
Registered: 2015-10-03
Posts: 1,217

Getting Debian live iso to boot in EFI mode.

Ok this is fairly dirty, also note I haven't tried an actual hdd install via this method. Other than creating the usb, booting the live iso, testing the sucker and checking in terminal to see if it was showing up as booted in EFI mode.

Ok with that outta the way, here goes ...

First so as to not reinvent the wheel see ... this.

Which is what I used to create a bootable usb drive and install grub to it. I also went ahead and downloaded + used the .zip package he provides in the tute.

Finding your usb. For me just plugged the sucker in and in terminal "lsblk" w/o quotes of course. It listed my usb drive as sdb yours may be different.

Followed along with the how to, copied debian-live-8.2.0-amd64-xfce-desktop.iso into the iso/ directory on the usb drive as he suggested.

ie:

cp debian-live-8.2.0-amd64-xfce-desktop.iso
/mnt/iso/

Then with the usb mounted, navigated to it in thunar and edited the grub.cfg file on the thumbdrive. This is what I ended up with, snagged the grub entry for Debian from the blessed Arch linux wiki and played with it a bit to suit the iso being used.

submenu "Boot em HD " {
    #menuentry "Reboot em USB" {
    #    set root="(hd0)"
    #    chainloader +1
    #}
    menuentry "HD1 MBR" {
        set root="(hd1)"
        chainloader +1
    }
    menuentry "HD1 Particao 1" {
        set root="(hd1,msdos1)"
        chainloader +1
    }
    menuentry "HD1 Particao 2" {
        set root="(hd1,msdos2)"
        chainloader +1
    }
    menuentry "HD1 Particao 3" {
        set root="(hd1,msdos3)"
        chainloader +1
    }
    menuentry "HD2 MBR" {
        set root="(hd2)"
        chainloader +1
    }
    menuentry "HD2 Particao 1" {
        set root="(hd2,msdos1)"
        chainloader +1
    }
    menuentry "HD2 Particao 2" {
        set root="(hd2,msdos2)"
        chainloader +1
    }
    menuentry "HD2 Particao 3" {
        set root="(hd2,msdos3)"
        chainloader +1
    }

        menuentry 'debian-8.2' {
    set isofile='/iso/debian-live-8.2.0-amd64-xfce-desktop.iso'
    loopback loop $isofile
    linux (loop)/live/vmlinuz boot=live config fromiso=/dev/sdb1/$isofile
    initrd (loop)/live/initrd.img
}
}

Yep messy, if someone wanted to clean it up and find a nicer looking arrangement great but it worked for me.

So open the the grub.cfg file found in /mnt/boot/grub/ in your favorite text editor, terminal or whatever floats ye boat.

Replace the contents of the file with the one I've provided above. Things to note you'll obviously have to change the live distro to the one you're using if you aren't using the live xfce iso. Substitute the name of the live iso you are using where appropriate in the above grub.cfg file entry. You'll also have to use the correct path to boot the kernel on your usb drive, if it's located somewhere other than where mine was.

This part fromiso=/dev/sdb1/$isofile mentioned my usb drive was sdb and the correct partition on the usb is sdb1 yours again could differ. Modify the grub entry accordingly.

ie: If your usb drive is showing up as sdc then you'd clearly use fromiso=/dev/sdc1 instead. Etc.

Pretty much it folks. Someone want to give this puppy a go to 100% confirm install viability, it'd be nice. Am too lazy to setup a vm.

Random comments: Using xfce or whichever live desktop iso really doesn't matter. As during the course of the install you can deselect everything except the base Debian system. When you get to that screen.

Clearly this has the potential to make a multiboot usb drive with however many iso's someone wants to fit onto it. Though if were planning on really messing with it. Would clean up the grub menu.

That's a wrap, may da nix be with you ! smile

Random refinements ... see below. Also random tip, personally have found renaming the iso's makes dealing with them less pita. Fire up your file-manager, right click those suckers and rename em eh.

This monster debian-live-8.2.0-amd64-xfce-desktop.iso becomes this debian8.2xfce.iso this setup doesn't care what you call the iso as long as you use the right name for it in the appropriate places.

Last edited by BLizgreat! (2015-10-26 06:05:41)

Offline

#2 2015-10-26 05:57:27

BLizgreat!
Resident Babbler - vll!
Registered: 2015-10-03
Posts: 1,217

Re: Getting Debian live iso to boot in EFI mode.

Babbling update:

Went ahead and cleaned up the grub.cfg file. Was getting on nerves. So the above became the following. Though both worked anyway.

submenu "Boot em HD " {
        #menuentry "Reboot em USB" {
        #    set root="(hd0)"
        #    chainloader +1
        #}
         menuentry 'debian-8.2' {
        set isofile='/iso/debian-live-8.2.0-amd64-xfce-desktop.iso'
        loopback loop $isofile
        linux (loop)/live/vmlinuz boot=live config fromiso=/dev/sdb1/$isofile
        initrd (loop)/live/initrd.img
    }
}

Pointless elaboration:

To add additional iso's to the usb drive. You'd copy them into the iso/ directory as described and add a grub menu entry for em as outlined here too. Though the exact syntax for the entry could vary by distro. The above example should cover Debian and based iso's. At least for the live iso media. Those for the actual Debian install could be slightly diff. Just visit the Arch wiki for all your multiboot usb grub entry needs. smile

Plenty of such examples all over the web if somebody is interested. Placing said entries above the last } in the grub.cfg file. Ok now that's a wrap. smile

Last edited by BLizgreat! (2015-10-26 06:40:15)

Offline

#3 2015-10-26 07:54:12

BLizgreat!
Resident Babbler - vll!
Registered: 2015-10-03
Posts: 1,217

Re: Getting Debian live iso to boot in EFI mode.

DAMMIT !!!

Well can report both success and failure folks. Went ahead and setup a partition. Installed from the usb and it did install and in UEFI mode.

With a couple glitches to be aware of. The live media iso doesn't give an option to deselect everything except base. It's the regular install iso's that offer this option (edit: When you select the text or graphical expert mode in the installer anyway. As well as other goodies that are lacking in the live iso's. Such as letting you choose to enable nonfree +backport repos while going through the installation.)

Also when running the live installer, grub2 simply would not install period. Though didn't matter, ran "sudo update-grub" in another install on the pc and it picked up on the new OS w/o need of it having grub.

Could install grub2 via live session - chroot but am not that interested. Another point I noticed, while the wonderful text on the boot screen is flowing past, one line says file system check failed but found no errors.

Could be the result of not having a bootloader installed of course. Don't want to fool with it anymore. Only wanted to make sure it worked or not.

That's pretty much about it. Outside of these things the install appears to be working just fine. So yeah ... it'll work. Overall considering it good.

vll! smile


Nope not so fast ... more babble ! Ya's know how I treasure babble. smile

This was pretty much just for mental exercise. Important thing really imo, is to know if you want BL-Hydrogen then use one of the regular Debian Jessie install iso's rather than the live versions.

However on the flipside, it worked and this is a confirmed method of making a multiboot usb drive. Not that there's any shortage of those. Due to the UEFI standard fat32 has to be used. Which means yep, you'll be limited to 4GB iso size but sheesh that's not all that bad.

Feel free to shower me with beer, cookies, the Ph #'s of women of loose virtue, whatever ya happen to have laying around folks. Ok ... NOW IT'S A WRAP ! big_smile

Last edited by BLizgreat! (2015-10-26 09:06:25)

Offline

#4 2015-10-26 08:50:56

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Re: Getting Debian live iso to boot in EFI mode.

Awesome work Seabiscuit -- thank you!

I will try this with a BL image tonight.
smile


“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#5 2015-10-26 09:03:41

BLizgreat!
Resident Babbler - vll!
Registered: 2015-10-03
Posts: 1,217

Re: Getting Debian live iso to boot in EFI mode.

^What no women of loose virtue !? hmm

Kidding thanks Hoas, actually just a single thanks from a kewl fellow like yaself + the learning experience made any effort well worth it. smile

Offline

#6 2015-10-26 17:48:22

BLizgreat!
Resident Babbler - vll!
Registered: 2015-10-03
Posts: 1,217

Re: Getting Debian live iso to boot in EFI mode.

And another option I've been considering playing with for awhile. Though not specific to booting debian live iso's in UEFI mode, so off-topic. Still it's ma thread and so am allowed to do that. smile

This kinda thing. Booting iso's directly from a hdd w/o need of burning to cd-dvd-usb. Haven't as yet tried it much less for actual installing a gnu/nix distro but yep, it's gnu/Nix so don't doubt it's fully possible and isn't limited to Ubuntu or ( Linux Mint.)

Babblers dictionary: Definition of Linux.

Gnu/Linux = The result of hundreds of collective years spent in parents/grandparents basements figuring out how to do just about anything imaginable with computers n technology. tongue

Last edited by BLizgreat! (2015-10-26 17:51:38)

Offline

#7 2015-10-26 19:08:32

nobody0
Disabled account
Registered: 2015-09-29
Posts: 664

Re: Getting Debian live iso to boot in EFI mode.

If it works, excellent.
I don't have a uefi computer, so can't test it. We'd wait for HoaS's report tomorrow.

Offline

#8 2015-10-27 03:30:02

BLizgreat!
Resident Babbler - vll!
Registered: 2015-10-03
Posts: 1,217

Re: Getting Debian live iso to boot in EFI mode.

Nah the above definitely works.  Am from the put your money, where your mouth is school of thought. Personally don't want to post info about summin w/o crash testing it meself.

At least on this system, the "file system check failed but no errors found" cause for concern I guess. Didn't spend enough time but don't doubt it's something resolvable. Said no errors found anyway.

Again though really see no reason why someone would install  BL via live iso. Just wanted to figure out how to do it and far as am concerned mission accomplished.

Vll! smile

Offline

#9 2015-10-27 11:45:20

nobody0
Disabled account
Registered: 2015-09-29
Posts: 664

Re: Getting Debian live iso to boot in EFI mode.

^ The link you gave in your OP,

First so as to not reinvent the wheel see ... http://ubuntuforums.org/showthread.php?t=2276498

maybe bit old. You may find more info here, http://ubuntuforums.org/showthread.php?t=2147295
It would be interesting to know how it fared for HoaS.

Offline

#10 2015-10-27 17:06:06

BLizgreat!
Resident Babbler - vll!
Registered: 2015-10-03
Posts: 1,217

Re: Getting Debian live iso to boot in EFI mode.

Looking things over, guessing all the pieces of da puzzle of how to boot iso's from a hdd partition are pretty much here. Add entries to /etc/grub.d/40_custom

Here's the link to the Arch wiki I mentioned above. Time to test drive the idea. Why da hades not.


vll! smile

Last edited by BLizgreat! (2015-10-27 17:07:48)

Offline

#11 2017-03-26 15:15:35

BLizgreat!
Resident Babbler - vll!
Registered: 2015-10-03
Posts: 1,217

Re: Getting Debian live iso to boot in EFI mode.

Yep this sucker continues to work. Have come to actually like this approach for making a multiboot USB drive. Though finding a working grub entry can still be a pita.

Got 4 or 5 iso's booting on a thumbdrive and still 12gigs of free space for more. Added BL Hydrogen to it with the following menu entry on the thumb drives grub.cfg file.

menuentry "BL Nix" {
      set isofile='/iso/BL.iso'
      loopback loop $isofile
      linux (loop)/live/vmlinuz boot=live config fromiso=/dev/sdb1/$isofile
      initrd (loop)/live/initrd.img

}

I renamed the Hydrogen iso to BL.iso, to make it easier to work with and again my usb is/was sdb1. Hydrogen fired right up and have to say, yep good looking, nice gnu/Nix from the BL team.

Vlbls! smile

Edit btw: Used a grub entry very similar to this to boot the Hydrogen iso from a hard drive partition. Going to put up a separate babble tute of the process and will link to this later.

Last edited by BLizgreat! (2017-03-26 15:32:24)

Offline

#12 2017-10-26 19:18:18

nashjc
Member
Registered: 2016-04-01
Posts: 27

Re: Getting Debian live iso to boot in EFI mode.

Thanks for the above. In https://forums.bunsenlabs.org/viewtopic.php?id=1677 I've been trying to remaster for EFI and legacy. Without too much trouble got a partly satisfactory result (I have to choose menu items, no default) and had to edit sdb1
to appropriate sdX1 for my systems.

Is there a way to detect the USB identity for the menuentry?

JN

Offline

#13 2017-10-27 03:18:52

BLizgreat!
Resident Babbler - vll!
Registered: 2015-10-03
Posts: 1,217

Re: Getting Debian live iso to boot in EFI mode.

^ Not sure what you're asking there. If you mean see what the usb is called, plug it in and then in terminal type "lsblk" will show the thumb drive.

Offline

Board footer

Powered by FluxBB