0

I have task to use 32Gb flash as place to install OS, so PC without hard drive load flash and can work(Not LiveUSB!). Of course, I can use generic install algorithm, but I have already a computer with 500 Gb disk with 25GB root partitotion and GRUB installed in MBR. So, how can I just copy content of my computer to flash to get task solved? I tried

dd if=/dev/sda1 /dev/sdb

but It do not work/

5
  • As an aside, maybe you could elaborate on why LiveUSB is not suitable for you? It solves the problem elegantly and I'm not able to think of any serious drawbacks, except maybe that if you use the master image, the clones will inherit log files, history, etc.
    – tripleee
    Commented Nov 23, 2012 at 9:11
  • LiveUSB, as I know is not for generic work. I boots, but do not save any configs for future boots. It must be transparent -- target user is very newbie.
    – KAction
    Commented Nov 23, 2012 at 10:30
  • 1
    At least Ubuntu offers a way to persist changes to the "live" USB image.
    – tripleee
    Commented Nov 23, 2012 at 11:35
  • Didn't know. Next time will try such USB.
    – KAction
    Commented Nov 23, 2012 at 11:52
  • See e.g. linuxliveusb.com/en/help/faq/persistence/67-what-is-persistence
    – tripleee
    Commented Nov 23, 2012 at 12:24

1 Answer 1

0

You are mixing apples and oranges. Create a partition table on /dev/sdb and copy sda1 to sdb1, or copy all of sda (partition table and all) to sdb wholesale.

I can report success with the former, albeit my experience is from many years ago; but the latter is tricky to get to work entirely correctly. Perhaps you're better off creating a partition table and installing Grub separately. There are various recipes for making USB sticks bootable; it's not hard.

I'm rather confident the latter will not work unless you can set up sda and sdb to have exactly the same disk geometries etc; or limit the dd transfer with something like bs=1024 count=33554432 (probably better with a bigger block size and a correspondingly smaller count), and live with the fact that the partition table is not exactly right. If you mount the boot partition read-only, you should not be able to create any damage to the file system anyway (... I hope).

As a partial workaround, if you can play around with the disk on your source machine, you could set it up to have two partitions in the first 32G and then mount the rest as a separate /home partition or whatever; then maybe live with the fact that the stick will try to mount a nonexistent partition (maybe that will kill it, haven't tried).

1
  • Thanks. I got idea about dd'ing partitions, not devices. I just didn't want to mess with GRUB. Btw, I already solved task in straight way.
    – KAction
    Commented Nov 23, 2012 at 10:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .