Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

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

Ask for help with issues regarding the Installations of the Debian O/S.
Message
Author
User avatar
sunrat
Administrator
Administrator
Posts: 6382
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 115 times
Been thanked: 456 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: 1284
Joined: 2009-08-29 18:10
Location: Costa Rica
Has thanked: 21 times
Been thanked: 44 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
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 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
Administrator
Administrator
Posts: 6382
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 115 times
Been thanked: 456 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
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 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
Administrator
Administrator
Posts: 6382
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 115 times
Been thanked: 456 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
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 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: 136
Joined: 2012-06-30 11:06
Has thanked: 3 times

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