You are not logged in.

#1 2017-03-26 16:35:12

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

Boot Bunsenlabs, Hydrogen iso from a partition.

OK I've been dorking with how to do this here and there for awhile and finally success! smile

This will likely work with a ton of Debian-based iso's. edit: Any iso, it's just a matter of finding the right grub menuentry.

So here goes, in my case the iso was/is located on a shared ext4 partition on sda7.

Mounting a shared partition:

Create a mount point. Call yours whatever you want and create it in either /mnt or /media, I went with /mnt and named the mount pt Data.

 sudo mkdir /mnt/Data

Mount it.

 sudo mount -t ext4 /dev/sda7 /mnt/Data

Unmount it.

 sudo umount /dev/sda7

Go ahead and recursively chown the mount pt for your user.

sudo chown -R yourusername /mnt/Data

Set it up so the partition is automatically mounted @ boot in fstab, I'm using leafpad as the text editor here, use whichever you prefer on the command.

 gksudo leafpad /etc/fstab &exit

Here's my edit added to fstab, obviously change yours accordingly.

UUID=Put-your-shared-partition-UUID-here /mnt/Data   ext4   defaults,noatime    0   2

I went with noatime as one of the mount options for the partition. Google fstab to review such and apply whichever you prefer.

OK so now I've got an ext4 share that will mount every time I boot.

With that out of the way moving on to the point of this dorkish how2.

The Bunsenlabs Hydrogen iso, which I renamed BL.iso to make it easier to work with(less typing) is located here.

/dev/sda7/home/myusername/SHARED/BL.iso

 

Which is a directory in /home partition for a user in another gnu/nix OS I've got installed.

So in the OS (it's on sda3) I just setup to automount sda7 in, I open the following file to add a grub menuentry to boot the Hydrogen iso.

 gksudo leafpad /etc/grub.d/40_custom &exit

and added this

 menuentry 'BL Nix' {
    set isofile='(hd0,7)/myusername/SHARED/BL.iso'
    loopback loop $isofile
    linux (loop)/live/vmlinuz boot=live config fromiso=(hd0,7)/myusername/SHARED/$isofile
    initrd (loop)/live/initrd.img

} 

Note: in the above where I said my username, it's the username for the user of that os's user. I use the same username across all the Nix os's on the pc anyway.

What I'm trying to say here is the most important thing is using the correct filepath to the iso folks.

After you do this, update grub.

 sudo update-grub

Well there it is, where it says stuff like $isofile that's literally what you put, not the name of the iso you're using. At this point I've only booted the iso up and it works perfectly. Haven't tried installing it via this method to another partition yet. Can just confirm it works to boot the iso from a partition.

Vll! smile

PS, more comments: In grub2 hd0 is the 1st hdd, sda. Sdb would be hd1, sdc = hd2 and so forth the partition number is whatever the number is. So for me sda7 for use with grub is (hd0,7).

Also the OS on sda3, is the one who's grub2 is in control of the system boot. There's 2 other Nix os's onboard. Doesn't really matter I can add grub entries to them to boot the iso too.

Last edited by BLizgreat! (2017-03-26 21:20:01)

Offline

#2 2017-03-26 16:40:17

damo
....moderator....
Registered: 2015-08-20
Posts: 6,734

Re: Boot Bunsenlabs, Hydrogen iso from a partition.

Typo?

Last edited by damo (2017-03-26 16:51:13)


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#3 2017-03-26 16:47:49

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

Re: Boot Bunsenlabs, Hydrogen iso from a partition.

^Yeah corrected my friend, damn Android autocorrect!! I hate it and one of the 1st things I disable but this isn't my phone. 

Looking at the Hydrogen desktop as we speak/type, you guys did a helluva job fellow nixer. smile

How does someone initiate the installer? I want to try to install to another partition, to see if it'll work. Dammit also forgot the closing bracket } for the grub entry. It's corrected now too.

If I ever meet any of the peeps responsible for creating droid autocorrect, I'm punching them in the mouth. hmm

Last edited by BLizgreat! (2017-03-26 17:13:33)

Offline

#4 2017-03-26 18:43:53

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

Re: Boot Bunsenlabs, Hydrogen iso from a partition.

Nah, so far it's a no go. Changed the path to point to the kernel and initrd.gz in the install directory on the iso. Started installing but freezes at can't find cd/dvd and modules on it.

Read about a few work-arounds that might work though burnt out on this for now. At least it boots iso's from hard drive, shrugs.

Last edited by BLizgreat! (2017-03-26 18:44:43)

Offline

#5 2017-03-26 18:58:54

Horizon_Brave
Operating System: Linux-Nettrix
Registered: 2015-10-18
Posts: 1,473

Re: Boot Bunsenlabs, Hydrogen iso from a partition.

I may be dense on this... but what is this trying to solve? What's stopping you from doing this normally?


"I have not failed, I have found 10,000 ways that will not work" -Edison

Offline

#6 2017-03-26 19:17:38

damo
....moderator....
Registered: 2015-08-20
Posts: 6,734

Re: Boot Bunsenlabs, Hydrogen iso from a partition.

^ I can see a good use-case for having a whole bunch of iso's on a single partition, whether hdd or removable. Boot to one of them to play with, and being able to install it as well sounds cool smile


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#7 2017-03-26 19:29:03

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

Re: Boot Bunsenlabs, Hydrogen iso from a partition.

Several things fellow nixer.

Wanted to learn to boot (and hopefully install iso's) from hard drive w/o having to burn a cd/dvd or using a usb drive.

The cd/dvd drive on this laptop is borked and tried dd'ing Hydrogen to USB, didn't work for whatever reason. So for now, I'm part way there. Booting iso's from hdd.

Besides its fricken cool. Can put a shizzleton of iso's in a directory or even setup a partition or etc to stash them in and boot em w/o any additional stuff.

Btw many approaches to making such persistent will also apply to this, so think about it eh. How it's useful and cool is fairly obvious.

+1 Damo, will eventually figure the missing piece of this puzzler out. Vll! smile

Last edited by BLizgreat! (2017-03-26 19:49:39)

Offline

#8 2017-03-26 21:33:21

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

Re: Boot Bunsenlabs, Hydrogen iso from a partition.

Dang it one more comment!

Once I figure out how to make these persistent installing them becomes moot, I can have 50 Nix installs running from a directory or partition w/o having to go through a conventional bare-metal process. As long as I've got the diskspace on the hdd.  Can also do so w/o any need of kvm or VirtualBox-etc.

Another application, a person can setup a small partition and pack it with recovery iso's. After doing so, let's say gnu/nix OS c's bootloader got borked on the system, no worries, x-nixer boots up, selects supergrubdisk2 from the iso's on the recovery partition-etc, fires it up, chooses boot from disk, boots the OS having probs, reinstalls grub2 for it and done in 5mins.

Whew ok, that's a wrap. smile

Offline

#9 2017-03-26 22:50:51

Horizon_Brave
Operating System: Linux-Nettrix
Registered: 2015-10-18
Posts: 1,473

Re: Boot Bunsenlabs, Hydrogen iso from a partition.

BLwillbegreat! wrote:

Dang it one more comment!

Once I figure out how to make these persistent installing them becomes moot, I can have 50 Nix installs running from a directory or partition w/o having to go through a conventional bare-metal process. As long as I've got the diskspace on the hdd.  Can also do so w/o any need of kvm or VirtualBox-etc.

Another application, a person can setup a small partition and pack it with recovery iso's. After doing so, let's say gnu/nix OS c's bootloader got borked on the system, no worries, x-nixer boots up, selects supergrubdisk2 from the iso's on the recovery partition-etc, fires it up, chooses boot from disk, boots the OS having probs, reinstalls grub2 for it and done in 5mins.

Whew ok, that's a wrap. smile

Haha, okay, sounds like a fun project then! Yea I wasn't aware that you were trying to boot multiple iso's stored on a hdd, or what have you. Makes a lot more sense, as I don't know of an easy, workable method of having more than one iso been bootable.


So to keep this straight, you would have maybe 3 or 4 bootable iso files, on one partition, now do you mean to then reboot your host OS, have grub be able to pick one out from the total 3 or 4 iso's in the partition?  And ideally from your 2nd post, you want to be able to have boot with grub, multiple iso's out of that bunch?  How would this even look like? If you boot your computer, grub finds and lists the different bootable iso's... how can you choose multiples without rebooting ? Do you mean to say you can have multiple iso sessions running at once?


"I have not failed, I have found 10,000 ways that will not work" -Edison

Offline

#10 2017-03-27 03:58:15

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

Re: Boot Bunsenlabs, Hydrogen iso from a partition.

Someone can have as many iso's on the partition or directory as they want (have enough diskspace to hold anyway.) Can only have 1 booted at a time and would have to add a grub menuentry in the 40_custom file for each iso. You select whichever in the boot menu, when the pc boots-up.

With diskspace being ridiculously large/cheap nowadays not a big deal. Someone could also scatter the iso's across multiple drives, sda, sdb, sdc, an external hdd, whatever.

As long as you've got the right menuentry pointing to the iso (right filepath) so grub can find the iso, it'll boot up.

Think of this kinda setup like a 1tb multiboot thumb drive. Only with several advantages over that. If someone wanted it setup this way and had 1tb of drive space to devote.

Vll! smile

PS, haven't figured the how2 install yet but know it's long been possible from research, same for the making this persistent. Persistent usbs have been around a long time.

Will have to study those projects more closely to find out how they achieve their thing and apply it to what I'm babbling about here. Anyone who wants to collaborate or pitch in, by all means please do.

Got a few sound theories as to how to go about it. But haven't worked out the details/snags.

Last edited by BLizgreat! (2017-03-27 04:35:17)

Offline

#11 2017-03-27 04:45:36

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

Re: Boot Bunsenlabs, Hydrogen iso from a partition.

Btw: Openvz is one gnu/nix OS. Often called chroot on steroids, things kept separate by something like chroot jails. So obviously, yes it's clearly possible to run tons of gnu/Linux os's on the same system simultaneously.

Not real familiar with the intimate workings of openvz though.

Last edited by BLizgreat! (2017-03-27 04:46:32)

Offline

#12 2017-03-27 06:41:40

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: Boot Bunsenlabs, Hydrogen iso from a partition.

BLwillbegreat! wrote:

The cd/dvd drive on this laptop is borked and tried dd'ing Hydrogen to USB, didn't work for whatever reason. So for now, I'm part way there. Booting iso's from hdd.

It is possible to install Debian from a running system (ie, without booting into an ISO image) by following this guide:

https://www.debian.org/releases/stable/ … 03.html.en

The wonderful people over at grml offer a wrapper for the `debootstrap` command that automates some of the configuration:

https://grml.org/grml-debootstrap/

Once the new Debian system is up & running, the bunsen-netinstall script could then be used:

https://github.com/BunsenLabs/bunsen-netinstall

Finally, please post the full, exact command that you used to transfer the BL ISO image to your USB stick big_smile

https://www.debian.org/CD/faq/#write-usb

Offline

#13 2017-03-27 07:04:02

hhh
Gaucho
From: High in the Custerdome
Registered: 2015-09-17
Posts: 16,140
Website

Re: Boot Bunsenlabs, Hydrogen iso from a partition.

^ Which should be similar to

sudo cp *.iso /dev/sdb;sync

... where b is your usb drive and you've run the command from within a folder with only one ISO in it.

Just make sure what letter is your USB!!!

Last edited by hhh (2017-03-27 07:05:35)


I don't care what you do at home. Would you care to explain?

Offline

#14 2017-03-27 08:57:21

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

Re: Boot Bunsenlabs, Hydrogen iso from a partition.

Thanks fellow nixers,

In addition to other afore mentioned butt pains I'm also net-restricted atm. Thus all this damn typing on a smartphone and the ever growing hatred of Android auto-correct. tongue

Command used, opened a terminal in the directory holding iso, su to become root, then.

 dd if=nameofiso.iso of=/dev/sdb1 bs=4M; sync

Really don't get it, done this plenty of times previously, arghhhhh.

Still this babble topic has been something I've wanted to dork around with for quite awhile. At least figured out how to boot iso's from hdd.

Just need to figure out which modules I need to load to get the installer to quit bytching and include them in the menuentry me thinks. 

Couple other methods I've looked over too. Have tried grml, worked for some iso's, not others and tried something called grub-imageboot which is supposed to be similar. It didn't successfully boot chit. Ye gnu/Nix gawds, why have thou forsaken me!

Though thanks again fellows and if anything stands out to you guys about how I'm screwing up w creating the USB, would definitely appreciate knowing.

Offline

#15 2017-03-27 09:04:38

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

Re: Boot Bunsenlabs, Hydrogen iso from a partition.

Regardless this type of junk and assoc dorkishness will remain on my Nix dork 2do and holy crap, the junk someone can do with gnu/Linux if you screw w it long enough lists. tongue

Until I figure it out. Vll!

PS, the folks behind Easy2boot seem to be doing much of what I've been babbling about, only using a thumbdrive. Another virtue of gnu/Nix, somebody has probably been there, done it already. Just have to find em and copy/adapt whatever eh. big_smile

Last edited by BLizgreat! (2017-03-27 09:29:15)

Offline

#16 2017-03-27 09:28:43

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,654
Website

Re: Boot Bunsenlabs, Hydrogen iso from a partition.

BLwillbegreat! wrote:
 dd if=nameofiso.iso of=/dev/sdb1 bs=4M; sync

It's the partition number - you need to dd to the whole device sdb:

 dd if=nameofiso.iso of=/dev/sdb bs=4M; sync

...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#17 2017-03-27 09:37:43

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

Re: Boot Bunsenlabs, Hydrogen iso from a partition.

Thanks John-san, believe I tried both, couldn't remember, still can't for sure. Destroyed the multiboot usb I had setup to dd Hydrogen.

Recreated it, w BL on it now too. Thing is, this has kinda become a mission now. smile I want to figure out how to install to hdd from an iso on another partition on the drive. 

With a side goal of trying to figure out how to make bootable iso's on hdd persistent.

Do believe it's just a matter of including the right modules to load in the grub entry ! Argh!

Vll! smile

Last edited by BLizgreat! (2017-03-27 10:00:20)

Offline

#18 2017-03-27 09:45:19

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

Re: Boot Bunsenlabs, Hydrogen iso from a partition.

More fun weirdness, check out the Android app drivedroid

Wonder if I can install Hydrogen from my phone. tongue

Offline

#19 2017-03-27 09:57:06

Steve
Member
Registered: 2017-01-03
Posts: 642

Re: Boot Bunsenlabs, Hydrogen iso from a partition.

I had troubles with BL booting from the USB when i dd the iso to a usb stick so below is how i did it and got it to boot on my machine.

gdisk /dev/sdx ; use the "x" option, and then "z" option to blow away both mbr, and gpt part tables.
gparted /dev/sdx ; and then just create a new clean msdos part table. If you're using an *.iso image file then you do NOT need to format fat32, ..."

Once that was done i DD and then go back into gdisk and make sure that the boot flag is set.

Offline

#20 2017-03-27 10:02:57

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

Re: Boot Bunsenlabs, Hydrogen iso from a partition.

^Thanks fellow nixer. Ok gotta get back 2 the Nix dork drawing board for awhile, no doubt bbl 2 babble some more fellows. smile

Btw: This type of thing is clearly useful/cool as is. Menuentries to boot almost every iso imaginable from usb drive are all over the webz. Same one's will very likely work booting them from hdd too.

Though think being able to get them to be installable and/or persistent would be hella cool. The dang pieces are there, just have to figure out how to put em together!

Last edited by BLizgreat! (2017-03-27 10:15:40)

Offline

Board footer

Powered by FluxBB