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
Make bootable external hard drive system work on most machines
-
- Posts: 16
- Joined: 2013-08-18 22:43
- Been thanked: 1 time
Make bootable external hard drive system work on most machines
You know how a live disk will work on almost any box you boot it on? I want that kind of hardware flexibility on an external drive. I don't mean a flash drive - I mean a regular usb-connected external hard drive with spinning platters inside coated with magnetic media on which a working bootable ext4 filesystem resides. Not a virtual fs or anything like that. A plain, garden variety ext4 fs where changes to config files and so on are made to the magnetic media. I do not mean a virtual filesytem with "persistence." I mean exactly the same kind of setup that most of us boot from on a regular basis except that it is on an external drive.
This is no problem as long as I boot from the same machine I installed on. Installing to external media has been my standard practice for decades. Right now I'm running Bookworm from an external drive connected to a laptop that doesn't even have an internal drive installed. It's a traditional partition setup (I'll probably not abandon MBR until it doesn't work any more) with other OSs that are also bootable plus a data partition. And grub, of course, is on that same drive. I'd like to be able to connect the same drive to another machine and, with appropriate tinkering with BIOS settings if needed, boot Bookworm from it.
What packages do I need and what, if any, config changes do I need to make, to give it this kind of hardware agnosticism? Right now, when I want to boot my Desktop, I have to use a live flash drive made with Eggs (kind of like the old Remastersys).
This is no problem as long as I boot from the same machine I installed on. Installing to external media has been my standard practice for decades. Right now I'm running Bookworm from an external drive connected to a laptop that doesn't even have an internal drive installed. It's a traditional partition setup (I'll probably not abandon MBR until it doesn't work any more) with other OSs that are also bootable plus a data partition. And grub, of course, is on that same drive. I'd like to be able to connect the same drive to another machine and, with appropriate tinkering with BIOS settings if needed, boot Bookworm from it.
What packages do I need and what, if any, config changes do I need to make, to give it this kind of hardware agnosticism? Right now, when I want to boot my Desktop, I have to use a live flash drive made with Eggs (kind of like the old Remastersys).
-
- Debian Developer
- Posts: 452
- Joined: 2022-07-12 14:10
- Has thanked: 1 time
- Been thanked: 88 times
Re: Make bootable external hard drive system work on most machines
With BIOS you can freely move installed HDD between computers and it will just boot since the default installation refers to resources using UUIDs. With UEFI you need to do additional setup.
-
- Posts: 16
- Joined: 2013-08-18 22:43
- Been thanked: 1 time
Re: Make bootable external hard drive system work on most machines
Thanks, but that's not the issue. I should have made it clearer. The point is, when you install to a hard drive, by default, you get drivers only for the hardware you're installing on. So, on a different box, things often fail. The live disks are prepared to deal with MOST hardware, not just one specific setup. That's what I'm after.
-
- Debian Developer
- Posts: 452
- Joined: 2022-07-12 14:10
- Has thanked: 1 time
- Been thanked: 88 times
Re: Make bootable external hard drive system work on most machines
What do you mean? The kernel package contains all the drivers. Is this about some non-free stuff?Lew_Rockwell_Fan wrote: ↑2024-02-25 13:06Thanks, but that's not the issue. I should have made it clearer. The point is, when you install to a hard drive, by default, you get drivers only for the hardware you're installing on. So, on a different box, things often fail. The live disks are prepared to deal with MOST hardware, not just one specific setup. That's what I'm after.
Re: Make bootable external hard drive system work on most machines
I think that would require some work. Years ago, I got a hdd box with usb connection to boot on many linux pcs used, but that was before UEFI settings.
So you should deal each computer separately, connect drive, boot, go to bios, and select that the default.
So you should deal each computer separately, connect drive, boot, go to bios, and select that the default.
-
- Debian Developer
- Posts: 452
- Joined: 2022-07-12 14:10
- Has thanked: 1 time
- Been thanked: 88 times
Re: Make bootable external hard drive system work on most machines
I regularly move SSDs where debian has been installed between laptops without problems.
Re: Make bootable external hard drive system work on most machines
You can install extra firmware.
I did this a log time ago for a linux installation on a usb stick. I opened synaptic and selected all firmware that I could find and installed it. I think "sudo apt install firmware*" would work also.
I did this a log time ago for a linux installation on a usb stick. I opened synaptic and selected all firmware that I could find and installed it. I think "sudo apt install firmware*" would work also.
Re: Make bootable external hard drive system work on most machines
Can you boot from them, that is the issue. Yes I can too mount any disk/usb key, gets mounted to /mediat/$user/nnn.
-
- Debian Developer
- Posts: 452
- Joined: 2022-07-12 14:10
- Has thanked: 1 time
- Been thanked: 88 times
Re: Make bootable external hard drive system work on most machines
Of course newer bioses/uefis have the quick boot option, which could also work for the OP.
-
- Global Moderator
- Posts: 2719
- Joined: 2018-06-20 15:16
- Location: Colorado
- Has thanked: 41 times
- Been thanked: 201 times
Re: Make bootable external hard drive system work on most machines
It'll work! As the guys said...
Generally, this is an iterative thing since details of hardware never seen may be unknown, so we get it right on boot two. If details are known we get it all right on first boot.
It turns out this is a good KISS test. There is a lot to cover but the capability is native. Things that don't play well, we don't use! I will use the term 'declarations' to describe settings in /etc/*. There are two kinds, the good 'if this then that' I call hint files, and the bad kind 'do this' which are avoided.
Typical snags are network names for which we make mac match links, and sensor types which need the correct module loaded.
Propriety drivers like Nvidia are of the 'do this' flavor and will stall on the wrong hardware.
This 'native' capability could be better, so thank you @Lew_Rockwell_Fan for the thread starter and let's invite some detail into this thread. Many details are here on the forum scattered in the history...
I've wondered if a random live iso could be converted to a disk image, never tried.
Some of those iso's from the past have had scripted detection routines for proprietary drivers I've never bothered with - could those be scarfed into a generic disk image? I think they 'install' in a way that is not conducive to the following boot, so are missing a cleanup script to reset to 'generic'.
UEFI - no idea, any specifics other than a bios visit?
Hybrid graphics? Multiple gpus can have hint files, sometime commented out, and we can enable/disable live on first boot. We can jump gpu's with a logoff/logon cycle. VFIO is a passive driver and some hardware can be dynamically bound and released with sysfs echoes. That's all a tad dangerous and works less well with pciid's needing firmware loads. This used to be easier...
VM usage = Always include qemu-guest-agent and spice-vdagent.
I birth, upgrade, and add customizations to images as a vm. When we can read the mac sticker and sensor chips with a magnifier we can get it right on first boot. As mentioned above, pre-loading all firmwares and such is easy enough. The best imaging tool is qemu-img to take any image to disk, or disk to image, and is OS agnostic. These abilities is why I use qemu/kvm/libvirt and not software that is 'branded'.
Btw, physical usb's can be booted in a vm when pre-attached to a vfio passed port.
Generally, this is an iterative thing since details of hardware never seen may be unknown, so we get it right on boot two. If details are known we get it all right on first boot.
It turns out this is a good KISS test. There is a lot to cover but the capability is native. Things that don't play well, we don't use! I will use the term 'declarations' to describe settings in /etc/*. There are two kinds, the good 'if this then that' I call hint files, and the bad kind 'do this' which are avoided.
Typical snags are network names for which we make mac match links, and sensor types which need the correct module loaded.
Propriety drivers like Nvidia are of the 'do this' flavor and will stall on the wrong hardware.
This 'native' capability could be better, so thank you @Lew_Rockwell_Fan for the thread starter and let's invite some detail into this thread. Many details are here on the forum scattered in the history...
I've wondered if a random live iso could be converted to a disk image, never tried.
Some of those iso's from the past have had scripted detection routines for proprietary drivers I've never bothered with - could those be scarfed into a generic disk image? I think they 'install' in a way that is not conducive to the following boot, so are missing a cleanup script to reset to 'generic'.
UEFI - no idea, any specifics other than a bios visit?
Hybrid graphics? Multiple gpus can have hint files, sometime commented out, and we can enable/disable live on first boot. We can jump gpu's with a logoff/logon cycle. VFIO is a passive driver and some hardware can be dynamically bound and released with sysfs echoes. That's all a tad dangerous and works less well with pciid's needing firmware loads. This used to be easier...
VM usage = Always include qemu-guest-agent and spice-vdagent.
I birth, upgrade, and add customizations to images as a vm. When we can read the mac sticker and sensor chips with a magnifier we can get it right on first boot. As mentioned above, pre-loading all firmwares and such is easy enough. The best imaging tool is qemu-img to take any image to disk, or disk to image, and is OS agnostic. These abilities is why I use qemu/kvm/libvirt and not software that is 'branded'.
Btw, physical usb's can be booted in a vm when pre-attached to a vfio passed port.
- pbear
- Posts: 329
- Joined: 2023-08-27 15:05
- Location: San Francisco
- Has thanked: 1 time
- Been thanked: 57 times
Re: Make bootable external hard drive system work on most machines
What lindi said, the drivers are in the kernel. A full install USB drive can stumble over components not supported by the kernel, but so would a live session. By the way, perhaps of interest to others, the hybrid boot problem (BIOS + UEFI) is relatively easy to solve. Format disk GPT. Give it both a BIOS boot partition and an EFI partition. Install both boot loaders (using --target= parameter, if needed). Works fine.
-
- Debian Developer
- Posts: 452
- Joined: 2022-07-12 14:10
- Has thanked: 1 time
- Been thanked: 88 times
Re: Make bootable external hard drive system work on most machines
UEFI is easy to solve for external drives but I have not figured out a way to move internal SSDs between laptops when using UEFI as easily.pbear wrote: ↑2024-02-26 06:21 What lindi said, the drivers are in the kernel. A full install USB drive can stumble over components not supported by the kernel, but so would a live session. By the way, perhaps of interest to others, the hybrid boot problem (BIOS + UEFI) is relatively easy to solve. Format disk GPT. Give it both a BIOS boot partition and an EFI partition. Install both boot loaders (using --target= parameter, if needed). Works fine.
-
- Global Moderator
- Posts: 2719
- Joined: 2018-06-20 15:16
- Location: Colorado
- Has thanked: 41 times
- Been thanked: 201 times
Re: Make bootable external hard drive system work on most machines
I suppose this could be setup in a vm. Then using a separate usb temporary OS to image the internal storage with this vm prepped image? Sounds doable...