[Solved] Dual boot Debian and Windows + copy Debian O/S to new laptop

Help with issues regarding installation of Debian
Message
Author
User avatar
sunrat
Global Moderator
Global Moderator
Posts: 4056
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 17 times
Been thanked: 58 times

Re: Dual boot Debian and Windows + copy Debian O/S to new laptop

#41 Post by sunrat »

ticketman wrote: 2021-11-23 12:10 > forgot how to go about thanking forum members - please remind me how!
>Click on the thumbs up symbol in the member's post.
For some reason I can't see a thumbs up symbol ...
Strange, it should show top right of someone else's post just to the left of member's name. You have thanked someone once before and it's a new feature introduced only a few months ago. It shows for me in Firefox and also just checked in Chromium.
If you need further investigation, please start a new topic in Forum information, requests, and feedback. and post a screenshot of what you see in another member's post.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

User avatar
ticojohn
Posts: 1151
Joined: 2009-08-29 18:10
Location: /home/heart
Has thanked: 12 times
Been thanked: 30 times

Re: Dual boot Debian and Windows + copy Debian O/S to new laptop

#42 Post by ticojohn »

sunrat wrote: 2021-11-23 13:31
ticketman wrote: 2021-11-23 12:10 > forgot how to go about thanking forum members - please remind me how!
>Click on the thumbs up symbol in the member's post.
For some reason I can't see a thumbs up symbol ...
Strange, it should show top right of someone else's post just to the left of member's name. You have thanked someone once before and it's a new feature introduced only a few months ago. It shows for me in Firefox and also just checked in Chromium.
If you need further investigation, please start a new topic in Forum information, requests, and feedback. and post a screenshot of what you see in another member's post.
Hey there @sunrat, thanks for answering my question. And I am no longer seeing the thumbs up symbol. Strange! Maybe they have changed something. :?
I am not irrational, I'm just quantum probabilistic.

p.H
Posts: 2144
Joined: 2017-09-17 07:12
Has thanked: 2 times
Been thanked: 30 times

Re: Dual boot Debian and Windows + copy Debian O/S to new laptop

#43 Post by p.H »

sunrat wrote: 2021-11-22 22:15 apt list -i | cut -d'/' -f1 |awk 1 ORS=' ' | sed s/Listing...\ //g
1) The first line may not contain "Listing..." in non-English languages. Wouldn't it be better to skip the first line with "tail +2" instead ?
2) Wouldn't it be better to list only manually installed packages ?

User avatar
sunrat
Global Moderator
Global Moderator
Posts: 4056
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 17 times
Been thanked: 58 times

Re: Dual boot Debian and Windows + copy Debian O/S to new laptop

#44 Post by sunrat »

p.H wrote: 2021-11-23 19:31
sunrat wrote: 2021-11-22 22:15 apt list -i | cut -d'/' -f1 |awk 1 ORS=' ' | sed s/Listing...\ //g
1) The first line may not contain "Listing..." in non-English languages. Wouldn't it be better to skip the first line with "tail +2" instead ?
Good idea (but -n+2}. I thought the same but sed worked and it was late. :D
2) Wouldn't it be better to list only manually installed packages ?
That would assume all installations of packages not marked manual are identical, so no.

Updated command (thanks @p.H ) :

Code: Select all

apt list -i | cut -d'/' -f1 |tail -n+2 |awk 1 ORS=' ' >pkglist
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

p.H
Posts: 2144
Joined: 2017-09-17 07:12
Has thanked: 2 times
Been thanked: 30 times

Re: Dual boot Debian and Windows + copy Debian O/S to new laptop

#45 Post by p.H »

sunrat wrote: 2021-11-23 21:48 That would assume all installations of packages not marked manual are identical, so no.
No, that assumes packages marked automatic were not installed by the user but by dependencies, and will be installed if needed. Anything wrong with that ?

User avatar
sunrat
Global Moderator
Global Moderator
Posts: 4056
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 17 times
Been thanked: 58 times

Re: Dual boot Debian and Windows + copy Debian O/S to new laptop

#46 Post by sunrat »

p.H wrote: 2021-11-23 22:35
sunrat wrote: 2021-11-23 21:48 That would assume all installations of packages not marked manual are identical, so no.
No, that assumes packages marked automatic were not installed by the user but by dependencies, and will be installed if needed. Anything wrong with that ?
Cool. Once again you have proved to be a veritable bitstream of knowledge and help. Thank you!
So this gets a list of manual packages which can be installed by apt on a new install, much tidier command too:

Code: Select all

$ apt-mark showmanual | awk 1 ORS=' ' >pkglist
On the new system (I would use a minimal netinstall):

Code: Select all

# apt install </path/to/pkglist
Bottom line is this would be my preferred method to duplicate a Debian installation to a different computer. No need to edit boot loaders or system files like fstab. Just do a new netinstall, install packages, then copy your data over afterwards. It may even lose some unnecessary cruft.
Of course this doesn't copy over any customisations so you may need to copy config files from your backup, and if vastly customised the partition cloning method may end up easier. YMMV.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

p.H
Posts: 2144
Joined: 2017-09-17 07:12
Has thanked: 2 times
Been thanked: 30 times

Re: Dual boot Debian and Windows + copy Debian O/S to new laptop

#47 Post by p.H »

To be honest your point about packages marked auto not being identical was correct. When there are alternative dependencies, installed packages may depend on the package installation order.

Example :
- package A depends on B|C
- package D depends on C

If package A is installed first, then packages B and C will be automatically installed.
If package D is installed first, then only package C will be automatically installed.

Also, some packages may have been installed without Recommends (I often do it when I consider Recommends abusive).

ticketman
Posts: 124
Joined: 2012-06-30 11:06
Has thanked: 1 time

Re: Dual boot Debian and Windows + copy Debian O/S to new laptop

#48 Post by ticketman »

On a final note, my dual boot system has to access a common but physically seperate data drive, currently formatted as ntfs.
I have a question about the right way to do this, submitted here:
viewtopic.php?f=10&t=150929

Post Reply