copy os from usb to disk

Help with issues regarding installation of Debian

copy os from usb to disk

Postby peer » 2019-08-01 05:44

I have a working linux debian 9 os on my laptop (hda1).
I also have working linux debian 9 os (nr. 2) on a usb device (sdb1)
I want to copy the second os to my laptop and create a dual boot.
I am planning to do:
1. create a extra partition hdaX with the same size as sdb1
2. copy the partition sdb1 to sdaX with dd
3. change /dev/sdb1 to /devsdaX in grub.cfg
4. run grun-update on hda1

Will this work? Am I forgetting something or should I do this in another way?
peer
 
Posts: 57
Joined: 2017-03-26 10:14

Re: copy os from usb to disk

Postby ruwolf » 2019-08-01 06:28

Code: Select all
dd ...
is not needed here.

Code: Select all
cp -a
should be sufficient.

You must change /etc/fstab, too...
User avatar
ruwolf
 
Posts: 365
Joined: 2008-02-18 05:04
Location: Slovakia, Banovce nad Bebravou, Matice slovenskej 1260/4-7

Re: copy os from usb to disk

Postby peer » 2019-08-01 13:34

thanks,
I try to copy first and I forgot the fstab. I probably will have to change the UIID.
peer
 
Posts: 57
Joined: 2017-03-26 10:14

Re: copy os from usb to disk

Postby peer » 2019-08-02 07:31

I created a new partition with Gparted. OK!
Then tried to copy from usb -stick with the filemanager of parted-magic. NOT OK! There were copy-failures.
Then I cloned the partition instead with dd. OK!
I checked grub.cfg and fastb. Both used the proper UIID. OK!
Ran update-grub. OK!
Now I have a proper working dual boot!!!!
peer
 
Posts: 57
Joined: 2017-03-26 10:14


Return to Installation

Who is online

Users browsing this forum: eveil and 7 guests

fashionable