LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   squashfs iso to vmdk (https://www.linuxquestions.org/questions/linux-general-1/squashfs-iso-to-vmdk-4175650524/)

zio_mangrovia 03-20-2019 12:27 AM

squashfs iso to vmdk
 
I'm using VMware virtual machine which boots by customized 7.0.0 Debian ISO attacched to dvd device and now I wish to move exactly this environment to virtual disk.
I'd like to boot machine from vmdk (virtual disk) so I have both larger file system and read-write mode because dvd cannot permit to write to its file system and its size too small.
I customized some features into dvd iso, which has squashfs file system, but now my need is increasing. What do you suggest me?

jefro 03-20-2019 03:14 PM

I assume you have a live system. Is that correct?

You could simply unsquash the file. Ideally you'd do this on a new vm virtual hard drive. Then you may have to fool with the other files to get the remaining boot files and maybe put grub on.

There are some programs that can take a live image and place it on a usb. Without knowing exactly what you have I can't really guess. Rufus and other usb creators are pretty good on making a usb. Once you have it on a usb you could clone it to a raw file and then try to convert it to a vmdk. Or you could just clone it to a virtual hard drive.

zio_mangrovia 03-20-2019 03:19 PM

Quote:

Originally Posted by jefro (Post 5975969)
I assume you have a live system. Is that correct?

yes.

How can I start? I create vm with empty vmdk and I have to use live cd to format disk and to copy unzipped squashfs and install grub?

jefro 03-20-2019 05:35 PM

Create a system with two optical drives. Boot to some live media that has the ability to unsquash the version you have. Squashfs is kind of version specific. Puppy I or maybe DSL did it automatically so peek at that. However you will have to use file command maybe to find what version or use squash tools to find version. Debian may have that info for v7

With live boot you should be able to either transparently access the files in this iso or use installed squash tools or download to live the tools to unsquash the data would be my way to start.

Look at the rest of the files that are not under squash to decide what to do with them.

zio_mangrovia 03-21-2019 09:43 AM

2 Attachment(s)
Quote:

Originally Posted by jefro (Post 5976031)
However you will have to use file command maybe to find what version or use squash tools to find version. Debian may have that info for v7

For version you want to say "squashfs" version?

I exploded cdrom iso file (see 1st image) and there 2 folders : isolinux and live; there is a thing which I cannot understand.
When VM boots, It appears a boot menu (see 2nd image), I think It should be grub and its configuration file are in isolinux folder like background picture, menu choice configuration files, ... I think these files are missing in squasfs file intact if I start vm selecting 1st menu entry, It's loaded vmlinuz1 and initrd1 inside live folder.
How can I reproduce it on new machine? I have to install boot loader grub in new disk and have to create new menu configuration files?
What grub version ? 1 or 2 ?

Thanks for your precious help.

michaelk 03-21-2019 11:12 AM

Would installing to a virtual machine work with your customized features?

You do not have to worry about a squashfs file system but it may run slower due not running from RAM like the live system. And the entire system is now read/write.

zio_mangrovia 03-21-2019 11:39 AM

Quote:

Originally Posted by michaelk (Post 5976250)
Would installing to a virtual machine work with your customized features?

Yes, I'd like it because initially It was laboratory experiment but now I have to make several changes and I have to use this vm everyday and to keep on file system C++ files which I'll create.

Quote:

You do not have to worry about a squashfs file system but it my run slower due not running from RAM like the live system. And the entire system is now read/write.
I don't understand it, when the entire system is now read/write?!

About grub can you help me please ? (previous point)

thanks

michaelk 03-21-2019 01:46 PM

In the second picture you posted there are two menu items, Install and Graphical Install. Either option will install debian to the VMDK as a regular operating system with regular ext4 filesystems.

zio_mangrovia 03-21-2019 02:39 PM

Quote:

Originally Posted by michaelk (Post 5976299)
In the second picture you posted there are two menu items, Install and Graphical Install. Either option will install debian to the VMDK as a regular operating system with regular ext4 filesystems.

both installation menu are unavailable even if they are written on screen infact It happens nothing when you click these items

jefro 03-21-2019 02:46 PM

Kind of difficult to make major changes inside a squashfs file if it involves any sort of update I'd think for a beginner. Simple add files are easy. Unsquash and change files then re-squash. Then as above you could run from iso image on a vm.

Another way to go if you don't want to deconstruct this is to simply build a new system as you wish. It should be somewhat easy to discover what changes have been made on this unique image. Still would have to mount squashfs to loop and then copy from or at least examine.

zio_mangrovia 03-21-2019 02:55 PM

I wish to leave squashfs and to build my virtual machine with the same files of squash file system, my problem now is to make bootable the new disk.
I already exploded squasfs file

jefro 03-21-2019 04:52 PM

Kind of depends on how you want to run it. Almost any iso could be booted from grub2, grub4dos or maybe sysylinux/isolinux if you just want it to run. I might be tempted to run a live to usb type of program to pick it out to a usb. A usb will be a disk image you can use.

zio_mangrovia 03-21-2019 05:05 PM

I want only hard disk where to copy the OS image and to boot server from disk. I want to forget any image disk.

jefro 03-21-2019 09:13 PM

You can either follow recipe I suggested or attempt to make a clean install of linux then add in the changes this iso has.

I tend to point out ways over exact steps. I'm trying to get you to learn how to look up how to do this. :)

linus72 03-21-2019 10:49 PM

why debian 7? you can use a recent version to boot, customize then install to virtual machine.


All times are GMT -5. The time now is 10:39 AM.