awokd, what a relief to get some additional help here! The issue is that this CentOS VM was distributed as a learning environment for a specific course I'm taking with software/services/configurations/etc directly tied to the lessons. I need everything to be intact.
I've reached the limit of my experience in this process and can find no other material online to help me. Your dd loopback advice exactly fits this step I'm stuck at. I don't know how to make this bootable. Sigh... I wrote an email to linuxrespin.org yesterday pleading for help which has some information for you I dread to paraphrase/reformat so I'll repost here, because I list commands run and output of file/directory structures... This bends my brain. Apologies and thanks for helping with this mess: ----------------------------------------------------------------------------------------------------------------------- Hi linuxrespin team! I'm desperate and need your expertise. For one week now I've been bashing my brain trying to get this to work and I've reached the end of my capabilities. Can you please help me? 1. I have a CentOS virtual machine which runs perfectly in VirtualBox. The VM is in .vmdk format. *. I run Qubes OS and need to run CentOS as a guest. I need to convert the .vmdk virtual hard drives into a format which Qubes will accept. 2. I've used qemu-img to convert the .vmdk files into a raw image. 3. I've mounted the raw image (LVM) onto a loop device and am able to access the file system. 4. I have zero understanding of how to make an iso / live iso from this. Can you please help me? I've used the guide below to aide me, but the final tool from the author's repository does not work for me. Do you know how I can take the CentOS filesystem I have access to and turning it into a bootable iso? https://www.turnkeylinux.org/blog/convert-vm-iso ----------------------------------------------------------------------------------------------------------------------- ls -l /media/sf_Linux/CentOS\ 7.x\ 64-bit/ total 54015160 -rwxrwx--- 1 root vboxsf 8684 Jun 7 2017 CentOS 7.x 64-bit.nvram -rwxrwx--- 1 root vboxsf 3413508096 Jun 7 2017 CentOS 7.x 64-bit-s001.vmdk -rwxrwx--- 1 root vboxsf 2366242816 Jun 7 2017 CentOS 7.x 64-bit-s002.vmdk -rwxrwx--- 1 root vboxsf 4088070144 Jun 7 2017 CentOS 7.x 64-bit-s003.vmdk -rwxrwx--- 1 root vboxsf 2242772992 Jun 7 2017 CentOS 7.x 64-bit-s004.vmdk -rwxrwx--- 1 root vboxsf 226492416 Jun 7 2017 CentOS 7.x 64-bit-s005.vmdk -rwxrwx--- 1 root vboxsf 786432 Apr 26 2017 CentOS 7.x 64-bit-s006.vmdk -rwxrwx--- 1 root vboxsf 720896 Apr 26 2017 CentOS 7.x 64-bit-s007.vmdk -rwxrwx--- 1 root vboxsf 3080192 Jun 7 2017 CentOS 7.x 64-bit-s008.vmdk -rwxrwx--- 1 root vboxsf 720896 Apr 26 2017 CentOS 7.x 64-bit-s009.vmdk -rwxrwx--- 1 root vboxsf 19136512 Jun 7 2017 CentOS 7.x 64-bit-s010.vmdk -rwxrwx--- 1 root vboxsf 131072 Apr 26 2017 CentOS 7.x 64-bit-s011.vmdk -rwxrwx--- 1 root vboxsf 1029 Jun 7 2017 CentOS 7.x 64-bit.vmdk -rwxrwx--- 1 root vboxsf 69 Apr 26 2017 CentOS 7.x 64-bit.vmsd -rwxrwx--- 1 root vboxsf 2888 Jun 7 2017 CentOS 7.x 64-bit.vmx -rwxrwx--- 1 root vboxsf 272 Apr 26 2017 CentOS 7.x 64-bit.vmxf ----------------------------------------------------------------------------------------------------------------------- qemu-img convert -f vmdk turnkey-core.vmdk -O raw turnkey-core.raw mkdir turnkey-core.mount loopdev=$(losetup -s -f turnkey-core.raw) kpartx -a $loopdev ----------------------------------------------------------------------------------------------------------------------- ls -l /dev/mapper/ total 0 lrwxrwxrwx 1 root root 7 Apr 16 21:06 centos-home -> ../dm-5 lrwxrwxrwx 1 root root 7 Apr 16 21:06 centos-root -> ../dm-2 lrwxrwxrwx 1 root root 7 Apr 16 21:06 centos-swap -> ../dm-4 lrwxrwxrwx 1 root root 7 Apr 16 21:06 centos-var -> ../dm-3 crw------- 1 root root 10, 236 Apr 14 23:39 control lrwxrwxrwx 1 root root 7 Apr 16 19:03 loop0p2 -> ../dm-1 lrwxrwxrwx 1 root root 7 Apr 16 19:34 loop1p1 -> ../dm-0 lrwxrwxrwx 1 root root 7 Apr 16 19:34 loop1p2 -> ../dm-6 lrwxrwxrwx 1 root root 7 Apr 16 21:06 loop3p1 -> ../dm-7 lrwxrwxrwx 1 root root 7 Apr 16 21:06 loop3p2 -> ../dm-8 ----------------------------------------------------------------------------------------------------------------------- mkdir turnkey-core.mount mount /dev/mapper/$(basename $loopdev)p1 turnkey-core.mount ^ the above command gives me access to: ----------------------------------------------------------------------------------------------------------------------- config-3.10.0-514.16.1.el7.x86_64 config-3.10.0-514.2.2.el7.x86_64 extlinux grub grub2 initramfs-0-rescue-0a268e711a9e49e6958dee98a83bcef2.img initramfs-3.10.0-514.16.1.el7.x86_64.img initramfs-3.10.0-514.16.1.el7.x86_64kdump.img initramfs-3.10.0-514.2.2.el7.x86_64.img initramfs-3.10.0-514.2.2.el7.x86_64kdump.img initrd-plymouth.img lost+found symvers-3.10.0-514.16.1.el7.x86_64.gz symvers-3.10.0-514.2.2.el7.x86_64.gz System.map-3.10.0-514.16.1.el7.x86_64 System.map-3.10.0-514.2.2.el7.x86_64 vmlinuz-0-rescue-0a268e711a9e49e6958dee98a83bcef2 vmlinuz-3.10.0-514.16.1.el7.x86_64 vmlinuz-3.10.0-514.2.2.el7.x86_64 ----------------------------------------------------------------------------------------------------------------------- mount /dev/mapper/centos-root turnkey-core.mount ^ alternatively, using this gives me access to: ----------------------------------------------------------------------------------------------------------------------- ls -l turnkey-core.rootfs/ total 76 lrwxrwxrwx 1 root root 7 Jan 17 2017 bin -> usr/bin drwxr-xr-x 2 root root 4096 May 14 2015 boot drwxr-xr-x 2 root root 4096 May 14 2015 dev drwxr-xr-x 148 root root 12288 Jun 7 2017 etc drwxr-xr-x 2 root root 4096 May 14 2015 home drwxr-xr-x 2 root root 4096 Apr 16 23:01 isolinux lrwxrwxrwx 1 root root 7 Jan 17 2017 lib -> usr/lib lrwxrwxrwx 1 root root 9 Jan 17 2017 lib64 -> usr/lib64 drwx------ 2 root root 4096 May 14 2015 lost+found drwxr-xr-x 2 root root 4096 Nov 5 2016 media drwxr-xr-x 3 root root 4096 Nov 5 2016 mnt drwxr-xr-x 4 root root 4096 Apr 21 2017 opt drwxr-xr-x 2 root root 4096 May 14 2015 proc dr-xr-x--- 11 root root 4096 Jun 7 2017 root drwxr-xr-x 2 root root 4096 May 14 2015 run lrwxrwxrwx 1 root root 8 Jan 17 2017 sbin -> usr/sbin drwxr-xr-x 2 root root 4096 Nov 5 2016 srv drwxr-xr-x 2 root root 4096 May 14 2015 sys drwxrwxrwt 9 root root 4096 Jun 7 2017 tmp drwxr-xr-x 13 root root 4096 Jan 17 2017 usr drwxr-xr-x 2 root root 4096 May 14 2015 var ----------------------------------------------------------------------------------------------------------------------- mkdir turnkey-core.rootfs rsync -a -t -r -S -I turnkey-core.mount/ turnkey-core.rootfs umount -d turnkey-core.mount kpartx -d $loopdev losetup -d $loopdev cat>turnkey-core.rootfs/etc/fstab<<EOF aufs / aufs rw 0 0 tmpfs /tmp tmpfs nosuid,nodev 0 0 EOF ----------------------------------------------------------------------------------------------------------------------- I've skipped "GOTCHA 2" tklpatch-prepare-cdroot turnkey-core.rootfs/ ^ this fails with: ----------------------------------------------------------------------------------------------------------------------- tklpatch-prepare-cdroot turnkey-core.rootfs # preparing cdroot basename: missing operand Try 'basename --help' for more information. cp: omitting directory 'turnkey-core.rootfs/boot/' ----------------------------------------------------------------------------------------------------------------------- I figure, I've got this all extracted, can't I just take this stuff and get the boot/kernel stuff write and do some mksquashfs magic to create an iso? I've never used mksquashfs and I actually have no idea what my next step might be. I've scoured the Internet and every blog, forum, mailing list, stack overflow, youtube video, etc. that I could stomach. One week later I'm at my limit. ----------------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------------- When I mount centos-root, I get these files: config-3.10.0-514.16.1.el7.x86_64 config-3.10.0-514.2.2.el7.x86_64 extlinux grub grub2 initramfs-0-rescue-0a268e711a9e49e6958dee98a83bcef2.img initramfs-3.10.0-514.16.1.el7.x86_64.img initramfs-3.10.0-514.16.1.el7.x86_64kdump.img initramfs-3.10.0-514.2.2.el7.x86_64.img initramfs-3.10.0-514.2.2.el7.x86_64kdump.img initrd-plymouth.img lost+found symvers-3.10.0-514.16.1.el7.x86_64.gz symvers-3.10.0-514.2.2.el7.x86_64.gz System.map-3.10.0-514.16.1.el7.x86_64 System.map-3.10.0-514.2.2.el7.x86_64 vmlinuz-0-rescue-0a268e711a9e49e6958dee98a83bcef2 vmlinuz-3.10.0-514.16.1.el7.x86_64 vmlinuz-3.10.0-514.2.2.el7.x86_64 There's grub/boot stuff in here, kernal stuff... When I mount the first loopback device from /dev/mapper I get the / file structure... If I *were* to know which commands to run to press and iso, I don't know what directory structure I would use to include both the / structure and that other stuff, which looks to belong in /boot, no? But there's extra stuff in there, like all those image files, lost+found etc... Then there's the case of modifying stuff in /etc/fstab as was suggested in the tutorial... Whew... I wish I could ping Joanna, Marek, Andrew, etc., but that's ridiculous maybe... is it? I have dozens of course VMs like this! :'-( -- You received this message because you are subscribed to the Google Groups "qubes-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to qubes-users+unsubscr...@googlegroups.com. To post to this group, send email to qubes-users@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/qubes-users/108030eb-970d-4d95-a089-f8d4ba855b5e%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.