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

 

 

 

Portable linux installation with predefined hardware configs

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
godblessfq
Posts: 4
Joined: 2018-07-01 07:46

Portable linux installation with predefined hardware configs

#1 Post by godblessfq »

I have desktop computer and a laptop, I only use one at a time. What I want is a
portable hard drive with debian installed, and I can boot from it for both the
desktop and laptop. So I don't need to keep several copies of applications and
sync data between the two.

From the research I have done so far, there are two approaches:

1. use a live system with the drawback of not able to create user account, and I
doubt that the live system will have good hardware support, such as nvidia
graphics, as it is a pain even in an installed system.

2. install the system to a usb drive with the drawback of not able to
automatically detect hardwares that are different from the hardwares during
the install.

I think approach 2 is the way to go, with the following steps:

1. find out what files are changed when install linux to different hardwares
2. put those files in different folders of the installation
3. before connecting the portable usb drive to another computer, in the booted
system or connect the portable usb drive to another system, and hardlink
or symlink the hardware specific files to the correct path

It would be perfect if we could select the predefined hardware configuration at
boot time. I don't know how to do all this. Maybe somepeople have the same need like
mine. Any suggestions and directions to tools will be greatly appreciated!

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: Portable linux installation with predefined hardware con

#2 Post by bw123 »

godblessfq wrote: I have desktop computer and a laptop, I only use one at a time. What I want is a portable hard drive with debian installed, and I can boot from it for both the desktop and laptop. So I don't need to keep several copies of applications and sync data between the two.
...
Well, you would not need several copies of applications, just two. I think syncing the data could be fairly trivial, depending on how you setup.
godblessfq wrote: ...
It would be perfect if we could select the predefined hardware configuration at boot time.
...
I've been interested in this idea for awhile, and read several threads about it also. I used to have a usb install, and swapped it between an intel and a radeon setup by modifying an xorg.conf before booting it. It worked, but it really wasn't as beneficial and useful as I thought it would be. And what if I did want to use both at the same time? For instance play a game on the desktop, and internet on the laptop?

I have never found a way to do it that made sense, so installing to both systems and sharing data is what I do.
resigned by AI ChatGPT

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Portable linux installation with predefined hardware con

#3 Post by Head_on_a_Stick »

godblessfq wrote:2. install the system to a usb drive with the drawback of not able to
automatically detect hardwares that are different from the hardwares during
the install.
Why do you think that?

The system should be transferable as long as a driver isn't forced to load that doesn't work with the hardware (such as forcing an Intel video driver if the box only has a radeon video card)— as long as both machines accept the stock Debian configuration then udev will load everything you need.

If there are any problems with initrd.img then that can be rebuilt with all modules if needed.

I used to run #! from a USB3 stick and that was freely transferable across a wide range of devices with no need for tweaking.
deadbang

godblessfq
Posts: 4
Joined: 2018-07-01 07:46

Re: Portable linux installation with predefined hardware con

#4 Post by godblessfq »

The system should be transferable as long as a driver isn't forced to load that doesn't work with the hardware (such as forcing an Intel video driver if the box only has a radeon video card)
I don't think it is that simple, I can't find a package that can do hardware detection and xserver setup automatically. If there is a initrd image with all available drivers, why do we need a live image that is not able to fully utilize the hardware for some machines. Anyway, one install for all won't be possible if no body is interested, and the maintainer are going to drop support for live images https://lists.debian.org/debian-live/20 ... 00064.html

The possible workaround perhaps is to have the basic system installed in both computers, and applications installed in one of the two, if I am on the other computer, I can chroot to the externally attached drive of the previous system to use the single copies of some big applications and data.

godblessfq
Posts: 4
Joined: 2018-07-01 07:46

Re: Portable linux installation with predefined hardware con

#5 Post by godblessfq »

I used to have a usb install, and swapped it between an intel and a radeon setup by modifying an xorg.conf before booting it. It worked, but it really wasn't as beneficial and useful as I thought it would be. And what if I did want to use both at the same time? For instance play a game on the desktop, and internet on the laptop?
I still think there is a use case for one install for multiple systems: you can just duplicate the disk image if you want to use it on two machines, that will save you the time to setup and install the system multiple times. I know you can use preseeding to save some time, but still there are many other touch-ups that need to be conducted manually.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Portable linux installation with predefined hardware con

#6 Post by Head_on_a_Stick »

godblessfq wrote:
The system should be transferable as long as a driver isn't forced to load that doesn't work with the hardware (such as forcing an Intel video driver if the box only has a radeon video card)
I don't think it is that simple, I can't find a package that can do hardware detection and xserver setup automatically.
The X server itself is really rather good at autoconfiguration these days, how do you suppose the live images work?

As long as you have no xorg configuration file at all then Debian will detect the card and load the appropriate video driver — my #! USB stick was regularly swapped between an Intel & a Radeon laptop with no problems.
deadbang


User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: Portable linux installation with predefined hardware con

#8 Post by stevepusser »

It just works, in my somewhat limited experience. The kernel handles hardware detection and driver loading, so you don't need anything extra. Hands off any xorg.conf files unless you really know what you're doing. Lots of people have used the MX snapshot tool to do exactly what you say---making their own customized MX and then installing it on their friends' and family's machines. (MX snapshot is not compatible with standard Debian, though)

Why not something like Respin http://www.linuxrespin.org/ and see how it works?
MX Linux packager and developer

godblessfq
Posts: 4
Joined: 2018-07-01 07:46

Re: Portable linux installation with predefined hardware con

#9 Post by godblessfq »

My system is changing every day, so making lots of snapshots is not an option. I use dotbot to sync dotfiles between computers. I think the best way of sharing systems (app and data) between machines is perhaps schroot. Thanks to everyone for the tips!

User avatar
sunrat
Administrator
Administrator
Posts: 6457
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 472 times

Re: Portable linux installation with predefined hardware con

#10 Post by sunrat »

Try your No.2 option to see if it works. Otherwise -
debiman wrote:maybe what op wants is live usb with persistence?
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

CwF
Global Moderator
Global Moderator
Posts: 2669
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 196 times

Re: Portable linux installation with predefined hardware con

#11 Post by CwF »

It works fine without any work. If you'd like to you can specify all known net interfaces by mac so that is configured with what it finds. Xorg needs to be left alone but in a similar way known hardware can have conditions if found, and audio may need help to figure out. Or if your comfy editing a file cli to clarify, then a startx... I install to a vm, image to an ssd, and it works on every computer I have.Take a disk from a machine, image or mount it and it works in a vm. No issue really. Once you start adding extra stuff like vfio's, clock pinning and weird things you add errors in the logs, but it still works..

On edit I'll add, usb works too, I've imaged to a stick but prefer to use my usb2sata dongle since I often use an old 32G SSD for testing a computer. My main computer has a dock for the ssd, easier I think.

Post Reply