You are not logged in.

#1 2018-07-10 16:43:44

sleekmason
Member
Registered: 2018-05-22
Posts: 142

Unpack ISO-Change files- Repack

Howdy all,

In trying to learn more about the way distro's, and live images are put together, I am messing around with the bl-Helium_amd64+build.iso.

I am wanting to unpack, add/remove files and repack for use.

So far, I have mounted the iso using:

sudo mount -o loop bl-Helium_amd64+build2.iso /mnt/iso

And then because this is read only, I copy the results to a separate folder "BunsenLabs"
in my home directory.

I then make changes.

Here is where I am getting stuck.

So far, I have tried re-creating the iso using:

genisoimage -o cd.iso -R -J BunsenLabs

Which creates the iso.  I tried burning and reboot here, but no go. (figured).

All of the guides I found showed using mkisofs to do this, but I guess xorriso is the new program.

So, I then tried using this for xorriso to create a hybrid image hoping this would work:

xorriso -as mkisofs \
  -o output.iso \
  -isohybrid-mbr /usr/lib/syslinux/isohdpfx.bin \
  -c isolinux/boot.cat \
  -b isolinux/isolinux.bin \
   -no-emul-boot -boot-load-size 4 -boot-info-table \
  CD_root

Unfortunately, I'm not sure of the propper usage here either.

I also tried using a usb stick with dd, but am also unsure of the format. I have always used cd's, and simply never had one that held over a couple of g's until now.

I wiped the usb completely, made the filesystem, made a new partition using the whole device (ext4), then dd to the usb:

sudo dd if=cd.iso  of=/dev/sdb1 bs=4M

Trying to boot with the usb just gives me a blinking prompt. 


So, I am not stuck on any one method, just sharing part of what I have already tried that seems to be in the right direction.

Certainly open to other ways to do this, and while I prefer learning terminal commands, if a gui is available that works, I'm open to that as well until I can get this figured:)

Last edited by sleekmason (2018-07-10 16:45:21)


"Nothing in the world can take the place of Persistence. Talent will not; nothing is more common than unsuccessful men with talent. Genius will not; unrewarded genius is almost a proverb. Education will not; the world is full of educated derelicts. Persistence and determination alone are omnipotent." - Calvin Coolidge

Offline

#2 2018-07-10 22:16:05

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 1,579

Re: Unpack ISO-Change files- Repack

Are you following this guide https://wiki.debian.org/DebianInstaller/Modify/CD ?

Offline

#3 2018-07-10 22:38:34

sleekmason
Member
Registered: 2018-05-22
Posts: 142

Re: Unpack ISO-Change files- Repack

Wild.  In all my searching, the above link didn't come up.  Must not have been asking the right questions.

I will check it out.  Thank you!


"Nothing in the world can take the place of Persistence. Talent will not; nothing is more common than unsuccessful men with talent. Genius will not; unrewarded genius is almost a proverb. Education will not; the world is full of educated derelicts. Persistence and determination alone are omnipotent." - Calvin Coolidge

Offline

#4 2018-07-11 00:55:13

hhh
That's easy!
Registered: 2015-09-17
Posts: 5,963
Website

Re: Unpack ISO-Change files- Repack

On quick glance, this should be...

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

sdb with no number after it, and sync to make sure the image isn't still writing after the terminal prompt returns. Or using cp...

sudo cp cd.iso /dev/sdb;sync

https://forums.bunsenlabs.org/viewtopic … 784#p70784

I don't know anything about repacking the ISO, I'm afraid.

Online

#5 2018-07-11 09:50:52

ohnonot
...again
Registered: 2015-09-29
Posts: 3,129
Website

Re: Unpack ISO-Change files- Repack

sleekmason wrote:

Wild.  In all my searching, the above link didn't come up.

has happened to me too, esp. with debian's wiki.
something wrong with the whole debian.org site in that respect. it's labyrinthine. unsearchable.

Offline

#6 2018-07-11 20:48:34

sleekmason
Member
Registered: 2018-05-22
Posts: 142

Re: Unpack ISO-Change files- Repack

hhh wrote:

On quick glance, this should be...

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

Yep! That works real well. Thank you:)

So far, using the instructions from the wiki, I have successfully extracted the ISO image, made a change, remade the ISO, put it onto a USB stick, and have the initial screen come up. It's a win in my book. At least a bit of one.
 
I was hoping to replace the vmlinuz image's and the initrd.img in "live" with an updated kernel and have it boot into a different kernel, but nope! that didn't cut it. Suggestions? Maybe a file or two that needs a simple line update?

Anyway, exploring around in there is pretty neat. I will keep working at it to be sure. 

ohnonot wrote:

has happened to me too, esp. with debian's wiki.
something wrong with the whole debian.org site in that respect. it's labyrinthine. unsearchable.

Makes me feel a little better:) I wonder why it's like that?  Well, glad it's there anyway.  The mess I was creating before seeing the link was getting out of hand.


"Nothing in the world can take the place of Persistence. Talent will not; nothing is more common than unsuccessful men with talent. Genius will not; unrewarded genius is almost a proverb. Education will not; the world is full of educated derelicts. Persistence and determination alone are omnipotent." - Calvin Coolidge

Offline

#7 2018-07-11 21:48:53

tknomanzr
BL Die Hard
From: Around the Bend
Registered: 2015-09-29
Posts: 1,029

Re: Unpack ISO-Change files- Repack

You'd need to rebuild the initrd and update-grub, I am pretty sure. Grub needs to know the kernel name and any changes to the kernel and need a rebuilt initrd. You might need to do all that from a chroot environment, I think.

Offline

#8 2018-07-11 22:56:23

sleekmason
Member
Registered: 2018-05-22
Posts: 142

Re: Unpack ISO-Change files- Repack

tknomanzr wrote:

You'd need to rebuild the initrd and update-grub, I am pretty sure. Grub needs to know the kernel name and any changes to the kernel and need a rebuilt initrd. You might need to do all that from a chroot environment, I think.

Okay, so this is cool.  You are saying the system needs to be live mounted/chroot in order to make that kind of change?  It literally needs to update grub:)

So, yeah, if it isn't just grabbing files as needed, but IS the environment, that changes things considerably. Is this the case?

If so, debootstrap?, or something better? This means that when finished making changes, I can simply exit the environment with changes intact? And, do I have to get files into the chroot environment first? I guess they could be grabbed through any path, so maybe not necessary.


"Nothing in the world can take the place of Persistence. Talent will not; nothing is more common than unsuccessful men with talent. Genius will not; unrewarded genius is almost a proverb. Education will not; the world is full of educated derelicts. Persistence and determination alone are omnipotent." - Calvin Coolidge

Offline

Board footer

Powered by FluxBB