This question already has an answer here:
- Use a partitioned live usb 1 answer
I have a usb-drive which I want to use both as storage (for windows too) and as a (Linux) Bootable. So I have to image the ISO of the linux distribution that I have into a specific partition of my usb drive. Suppose the drive is
sdc and I have made two partitions:
sdc1 for storage(NTFS) in the beginning and
sdc2 (FAT32) following that (I use GParted).
I know that for the simple case of just making the drive bootable we use
dd as :
dd if=name.iso of=/dev/sdc bs=512k
That would of course image the iso in the drive, not the specific partition,making it impossible to use the usb as storage. I thought of using
/dev/sdc2 as the destination instead of
/dev/sdc but after googling I concluded that's not how it's supposed to work. So why can't I just use
/dev/sdc2 ? I tried both:
/dev/sdc changes any partitions I have made and it creates 2 partitions in the beginning and leaves the rest unallocated, as it's supposed to.Writing to
/dev/sdc2 doesn't "mess" with the partitions I have and it just writes in the second partition.
So what do I have to do? Do I have to partition the drive in another way (I've read this How do I partition a USB drive so that it's bootable and has a Windows-compatible data storage partition?) ?
Having done the partition correctly, how must I use
dd to write in a specific partition?