Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #275712 > unrolled thread

Boot from USB?

Started byHans <hans.ullrich@loop.de>
First post2024-12-14 21:10 +0100
Last post2024-12-16 16:20 +0100
Articles 11 — 6 participants

Back to article view | Back to linux.debian.user


Contents

  Boot from USB? Hans <hans.ullrich@loop.de> - 2024-12-14 21:10 +0100
    Re: Boot from USB? Michael Stone <mstone@debian.org> - 2024-12-14 21:30 +0100
    Re: Boot from USB? eben@gmx.us - 2024-12-14 21:30 +0100
    Re: Boot from USB? "Thomas Schmitt" <scdbackup@gmx.net> - 2024-12-14 21:50 +0100
    Re: Boot from USB? David Christensen <dpchrist@holgerdanske.com> - 2024-12-14 23:30 +0100
      Re: Boot from USB? Hans <hans.ullrich@loop.de> - 2024-12-15 16:40 +0100
        Re: Boot from USB? David Christensen <dpchrist@holgerdanske.com> - 2024-12-15 21:20 +0100
          Re: Boot from USB? Hans <hans.ullrich@loop.de> - 2024-12-16 15:20 +0100
            Re: Boot from USB? Hans <hans.ullrich@loop.de> - 2024-12-16 16:20 +0100
              Re: Boot from USB? Stefan Monnier <monnier@iro.umontreal.ca> - 2024-12-16 17:50 +0100
            Re: Boot from USB? Stefan Monnier <monnier@iro.umontreal.ca> - 2024-12-16 16:20 +0100

#275712 — Boot from USB?

FromHans <hans.ullrich@loop.de>
Date2024-12-14 21:10 +0100
SubjectBoot from USB?
Message-ID<JTGCC-h2St-7@gated-at.bofh.it>
Hi folks, 

I was unaware, that a native installed linux is capable from booting at the 
USB-port! 

I put a harddrive with linux with a native installed linux (native means, the 
harddrive was built-in) in an usb-case and could boot from it. This was nice!
Thus some questions appeared:

1. Is this is normal standard behaviour and can this be confirmed?

2. Does such a booted linux behave as lin ux from built-in harddrive or is 
there something I should watch?

I am asking, because I have several harddrives with "built-in"-installations 
on it, but I have not enough computers. As I do not want to open my computers 
and exchange the harddrive for an upgrade, the idea is, to put these 
harddrives into an usb-case, boot these and upgrade it.

This would so much ease my work!

Question is, will this work or will the upgrade possibly destroy some 
configurations, because it is now an USB-drive?

If all this is normal standard, what is the technical reason for this? Is this 
because the kernel is using initramfs and when this is loaded, it is no 
matter, from where it is started? 

I would be happy, if you could enlighten me.

Best regards

Hans

[toc] | [next] | [standalone]


#275713

FromMichael Stone <mstone@debian.org>
Date2024-12-14 21:30 +0100
Message-ID<JTGVX-h2Zs-1@gated-at.bofh.it>
In reply to#275712
On Sat, Dec 14, 2024 at 09:02:45PM +0100, Hans wrote:
>I put a harddrive with linux with a native installed linux (native means, the
>harddrive was built-in) in an usb-case and could boot from it. This was nice!
>Thus some questions appeared:
>
>1. Is this is normal standard behaviour and can this be confirmed?

It depends on a lot of variables, like what kind of boot (BIOS or EFI), 
how the drive/OS is configured, what the host system supports. There are 
many cases where it will just work, but also many configurations that 
won't work without additional steps. There's no reason it shouldn't work 
(possibly with some tweaking of configurations) on any reasonably modern 
system, and once working there's no reason it would have issues. The 
main thing you'd want to ensure is that all mounts are done by 
UUID/label/LVM path/etc rather than by drive letter, but that's long 
been the default. Legacy (BIOS) grub upgrades may also require 
additional steps if the drive is moved from its original drive letter as 
those are inherently tied to a device name rather than something like a 
UUID. EFI boot paths do not have that issue, but may require configuring 
grub to use the default removable media path (EFI\BOOT\BOOTX64.EFI 
rather than EFI\DEBIAN\GRUBX64.EFI or EFI\DEBIAN\SHIMX64.EFI).

[toc] | [prev] | [next] | [standalone]


#275714

Fromeben@gmx.us
Date2024-12-14 21:30 +0100
Message-ID<JTGVX-h2Zs-3@gated-at.bofh.it>
In reply to#275712
On 12/14/24 15:02, Hans wrote:
> Hi folks,
>
> I was unaware, that a native installed linux is capable from booting at
> the USB-port!
>
> I put a harddrive with linux with a native installed linux (native
> means, the harddrive was built-in) in an usb-case and could boot from
> it. This was nice! Thus some questions appeared:
>
> 1. Is this is normal standard behaviour and can this be confirmed?
>
> 2. Does such a booted linux behave as lin ux from built-in harddrive or
> is there something I should watch?

I don't have a USB HD or a USB case in which to put a hard drive, but USB
thumb drives work fine.  You may have to tell your BIOS / firmware to boot
from USB.

It could be that the drive you're trying to use doesn't have USB drivers in
its initramfs.  Is it a stock image, or something custom made?

[toc] | [prev] | [next] | [standalone]


#275717

From"Thomas Schmitt" <scdbackup@gmx.net>
Date2024-12-14 21:50 +0100
Message-ID<JTHfj-h36V-9@gated-at.bofh.it>
In reply to#275712
Hi,

Hans wrote:
> I put a harddrive with linux with a native installed linux (native means,
> the harddrive was built-in) in an usb-case and could boot from it.
> [...]
> 1. Is this is normal standard behaviour and can this be confirmed?

This depends on the settings of your computers firmware (Legacy BIOS or
EFI). But technically the bus type should not make much difference as
long as the involved firmware and the software on the disk can operate it.


> 2. Does such a booted linux behave as lin ux from built-in harddrive or is
> there something I should watch?

One difference will probably be the disk name in /dev/disk/by-*.
E.g. the names in /dev/disk/by-id usually contain the bus type and differ
in their shown device info depending on the bus at which they were
detected by the system software.


> Question is, will this work or will the upgrade possibly destroy some
> configurations, because it is now an USB-drive?

Your mileage may vary. Make a backup before trying system admininistration
tasks.


> If all this is normal standard, what is the technical reason for this?

The various busses present the drive to the software as storage device
with some kind of bundles of bytes. The lowest software layers unify these
device models in a common model with a consequtive list of storage blocks
of fixed size on which the higher software layers operate.
This way only a limited number of software modules have to be aware of
the differences between busses. The vast mojority of software sees only
a storage device of a particular size with particular content.


> Is this
> because the kernel is using initramfs and when this is loaded, it is no
> matter, from where it is started?

The block storage device model of Linux is already up and running when
the kernel runs software from the initramfs.
But as with /dev/disk/by-id names, there can be always some expectation in
the software or its configuration which is not fulfilled any more after
the disk has hopped to another bus type.


Have a nice day :)

Thomas

[toc] | [prev] | [next] | [standalone]


#275720

FromDavid Christensen <dpchrist@holgerdanske.com>
Date2024-12-14 23:30 +0100
Message-ID<JTIO5-h4bc-7@gated-at.bofh.it>
In reply to#275712
On 12/14/24 12:02, Hans wrote:
> Hi folks,
> 
> I was unaware, that a native installed linux is capable from booting at the
> USB-port!
> 
> I put a harddrive with linux with a native installed linux (native means, the
> harddrive was built-in) in an usb-case and could boot from it. This was nice!
> Thus some questions appeared:
> 
> 1. Is this is normal standard behaviour and can this be confirmed?
> 
> 2. Does such a booted linux behave as lin ux from built-in harddrive or is
> there something I should watch?
> 
> I am asking, because I have several harddrives with "built-in"-installations
> on it, but I have not enough computers. As I do not want to open my computers
> and exchange the harddrive for an upgrade, the idea is, to put these
> harddrives into an usb-case, boot these and upgrade it.
> 
> This would so much ease my work!
> 
> Question is, will this work or will the upgrade possibly destroy some
> configurations, because it is now an USB-drive?
> 
> If all this is normal standard, what is the technical reason for this? Is this
> because the kernel is using initramfs and when this is loaded, it is no
> matter, from where it is started?
> 
> I would be happy, if you could enlighten me.
> 
> Best regards
> 
> Hans


Running Debian on a USB drive is a feature of several Linux and BSD 
distributions.


Related -- AIUI you can run Debian on a SD card in supported computers; 
notably single-board computers (Raspberry Pi, etc.).


While it is possible to run Debian on a USB flash drive, write 
performance is lacking.  Interactive use can be choppy.  Write-intensive 
workloads can overheat and/or destroy USB flash drives.


I have standardized on 2.5" SATA SSD's for my OS drives.  I keep my OS 
images small and put my data on a file server.  I have a stack of 2.5" 
SATA SSD's with various OS instances.  I have laptops with externally 
accessible 2.5" SATA drive bays.  I install 2.5" SATA mobile racks in my 
desktops, workstations, and servers [1, 2].  I can mix and match SSD's 
and computers as desired.


I also have a USB-SATA adapter cable [3] that I can use to boot an SSD 
in supported computers.  This is very handy for maintenance and 
trouble-shooting; especially for machines whose internal drives are not 
readily accessible.


David


[1] https://www.startech.com/en-us/hdd/hsb220sat25b

[2] https://www.startech.com/en-us/hdd/s25slotr

[3] https://www.startech.com/en-us/hdd/usb3s2sat3cb

[toc] | [prev] | [next] | [standalone]


#275742

FromHans <hans.ullrich@loop.de>
Date2024-12-15 16:40 +0100
Message-ID<JTYSR-hem0-21@gated-at.bofh.it>
In reply to#275720
Hi David,
> 
> Running Debian on a USB drive is a feature of several Linux and BSD
> distributions.
> 

that is great news! 
> 
> Related -- AIUI you can run Debian on a SD card in supported computers;
> notably single-board computers (Raspberry Pi, etc.).
> 

I know, running already a Raspberry Pi with KALI-Linux on it.
> 
> While it is possible to run Debian on a USB flash drive, write
> performance is lacking.  Interactive use can be choppy.  Write-intensive
> workloads can overheat and/or destroy USB flash drives.
> 
Of course, but speed is not much important in my case. I just want to avoid, 
to open the notebook and change the hatrddrive and then back just for a simple 
upgrade. If thisu is running slower, no problem.

And, not to forget: I can do several upgrades simultanesly, when booting in a 
virtual environment. Virtual-manager with kvm is my favourite, because it can 
boot USB devices.

> 
> I have standardized on 2.5" SATA SSD's for my OS drives.  I keep my OS
> images small and put my data on a file server.  I have a stack of 2.5"
> SATA SSD's with various OS instances.  I have laptops with externally
> accessible 2.5" SATA drive bays.  I install 2.5" SATA mobile racks in my
> desktops, workstations, and servers [1, 2].  I can mix and match SSD's
> and computers as desired.
> 

Exactly, what i want to do.
> 
> I also have a USB-SATA adapter cable [3] that I can use to boot an SSD
> in supported computers.  This is very handy for maintenance and
> trouble-shooting; especially for machines whose internal drives are not
> readily accessible.
> 
> 
I had this one until about 14 days ago, when my Lenovo T520 dies, which was 
the only one with eSATA connector.

> David
> 
> 
> [1] https://www.startech.com/en-us/hdd/hsb220sat25b
> 
> [2] https://www.startech.com/en-us/hdd/s25slotr
> 
> [3] https://www.startech.com/en-us/hdd/usb3s2sat3cb


Best regards

Hans

[toc] | [prev] | [next] | [standalone]


#275750

FromDavid Christensen <dpchrist@holgerdanske.com>
Date2024-12-15 21:20 +0100
Message-ID<JU3fP-hhn3-5@gated-at.bofh.it>
In reply to#275742
On 12/15/24 07:30, Hans wrote:
> I had this one until about 14 days ago, when my Lenovo T520 dies, which was
> the only one with eSATA connector.


That sounds like a "USB/eSATA combo" port.  My Dell Latitude E6520 has 
one.  I use this cable to connect a 2.5" SATA drive:

https://www.ebay.com/itm/365236435286


David

[toc] | [prev] | [next] | [standalone]


#275765

FromHans <hans.ullrich@loop.de>
Date2024-12-16 15:20 +0100
Message-ID<JUk70-hyzM-3@gated-at.bofh.it>
In reply to#275750
Yes, same I cable I own. However, my only computer with this port is died. So 
at the moment I am looking for a new (better say: used) one. 

The cable worked well with 2,5" SSD, but 3,5" SSD need too much current, the 
port does not deliver. No problem for me, as I still only have one single 3,5" 
SSD.

Have a nice week.

Best 

Hans



Am Sonntag, 15. Dezember 2024, 21:14:42 CET schrieb David Christensen:
> On 12/15/24 07:30, Hans wrote:
> > I had this one until about 14 days ago, when my Lenovo T520 dies, which
> > was
> > the only one with eSATA connector.
> 
> That sounds like a "USB/eSATA combo" port.  My Dell Latitude E6520 has
> one.  I use this cable to connect a 2.5" SATA drive:
> 
> https://www.ebay.com/itm/365236435286
> 
> 
> David

[toc] | [prev] | [next] | [standalone]


#275768

FromHans <hans.ullrich@loop.de>
Date2024-12-16 16:20 +0100
Message-ID<JUl33-hzcI-5@gated-at.bofh.it>
In reply to#275765
Ahem, well, it is of course no SSD, just a harddrive with SATA port.
And I got this one from a heritage.

Hans

Am Montag, 16. Dezember 2024, 16:10:02 CET schrieb Stefan Monnier:
> > No problem for me, as I still only have one single 3,5" SSD.
> 
> Really?  A 3½" SSD?  Where did you find such a beast?
> I'm curious to know the make/model.
> Also curious what made you choose to buy such a thing instead of the
> more common 2½" SSDs.
> 
> 
>         Stefan

[toc] | [prev] | [next] | [standalone]


#275780

FromStefan Monnier <monnier@iro.umontreal.ca>
Date2024-12-16 17:50 +0100
Message-ID<JUms9-hzZn-3@gated-at.bofh.it>
In reply to#275768
> Ahem, well, it is of course no SSD, just a harddrive with SATA port.
> And I got this one from a heritage.

Oohhh..... big disappointment!


        Stefan

[toc] | [prev] | [next] | [standalone]


#275769

FromStefan Monnier <monnier@iro.umontreal.ca>
Date2024-12-16 16:20 +0100
Message-ID<JUl33-hzcI-9@gated-at.bofh.it>
In reply to#275765
> No problem for me, as I still only have one single 3,5" SSD.

Really?  A 3½" SSD?  Where did you find such a beast?
I'm curious to know the make/model.
Also curious what made you choose to buy such a thing instead of the
more common 2½" SSDs.


        Stefan

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web