You are not logged in.

#1 2023-11-24 19:05:55

gabespound
Member
Registered: 2023-11-14
Posts: 13

Need help copying contents of bootable iso to a different directory

I have an experimental windows driver that allows installation and booting to an md style raid array (software raid).  This is how I have my raid setup for linux, and this would enable a fairly seemless dual boot for my setup.  Yes i realize I could have used hardware raid, but I ran into many issues during installation when attempting a hardware raid and was unable to get it working. I would like to copy the contents of the bootable windows iso into a directory I can modify, add my driver, and then recreate the iso.

I am unable to simply cp -r this directory, I am met with "error reading 'file.file': Input/output error" for most if not all files.  I came across an explanation, that certain files are too large for cp and that I could use scp with localhost to chunk the files up.  THis results in a more successful copy, but some files (lots of dll files, but perhaps more types), yield "scp: read remote "file.file": Failure. scp: Download of file "file.file" failed.

What approach should I try, or how may I have overcomplicated this situation?  Is there an easy way for me to modify this iso and have it still be bootable?

Offline

#2 2023-11-25 01:05:08

jonno2002
Member
Registered: 2016-11-21
Posts: 876

Re: Need help copying contents of bootable iso to a different directory

you should be able to mount the iso like this:

mount -o loop /path/to/iso /path/to/mount_dir

and then copy the contents to a folder where you can modify them:

cp -r /path/to/mount_dir/* /path/to/modify_dir/

then create a usb stick installer using cfdisk and ms-sys:

cfdisk -z /dev/your_usb_stick

then make a DOS filesystem with one BOOTABLE PRIMARY parition TYPE 7 (ntfs) and save+exit.
then:

mkfs.ntfs -f /dev/usb_stick_partition

and then either (cant remember this part too well but it does work when you get it right):

ms-sys -7 /dev/your_usb_stick

or

ms-sys -n /dev/your_usb_stick

then copy your modified filesystem over:

mount /dev/usb_stick_partition /path/to/mount
cp -r /path/to/modify_dir/* /path/to/mount/

been a while since ive had to make a bootable windows stick but this is how i did it from memory.
dont seem to remember having cp errors either ...

see how you get on with that anyway

Offline

Board footer

Powered by FluxBB