[TriLUG] booting off usbstick

David Brain via TriLUG trilug at trilug.org
Sat Jul 11 15:18:06 EDT 2020


Hi,

Setting aside the questions of Why?, and is it a 'Good Idea'... Could you
just remove/disconnect the storage drives, insert your target USB, and
install onto the usb drive from a second OS install USB drive?

Then you should be left with a system will boot, and you can then connect
your storage.

I had a system that booted off a USB stick, back before grub supported
/boot on mdraid,  it was just the boot partition and boot loader, however
it work just fine.

David

On Sat, Jul 11, 2020, 1:04 PM Joseph Mack NA3T via TriLUG <trilug at trilug.org>
wrote:

> On Sat, 11 Jul 2020, Stephen P. Schaefer via TriLUG wrote:
>
> thanks for everyone's suggestions, but the task really is to boot an
> arbitary
> diskless computer off a usb stick, something that's done routinely with
> usb
> sticks with live file systems.
>
> The problem is that I don't know how it's done. Just for fun, about 10
> years
> ago, I tried booting my normal filesystem from a usb stick and got the
> same
> results (kernel panic) and gave up.
>
> I'm back trying again. This time, the push is that I want the drive trays
> for
> storage, but this is incidental to getting the machine to boot off a usb
> stick.
>
> > I may be doing something similar to what Joe is trying to do: I'm
> running
> > CentOS 8 from an (external) USB stick, with the four drive bays devoted
> to
> > providing NFS (stripe accros mirrors; (tested) spare drive in a desk
> drawer.
> > What's different is that I planned the system this way: I installed
> CentOS
> > from a DVD with none of the disk drives installed, just the USB, and
> CentOS
> > had no choice but to install on the USB.
>
> I was in the process of building a usb stick from scratch this way, when I
> read
> your posting. I was heartened to know that in the right circumstances, it
> works.
> In my case, I didn't expect any joy, as this is the method I used to build
> the
> SATA disk that kernel panics booted off the usb bus. The install doesn't
> know
> whether it's writing to a usb stick or to a SATA drive, so I couldn't see
> how
> the files on the different types of devices would be any different. As it
> turns
> out, the usb stick I made this way kernel panics too.
>
> The install makes an optional syslinux boot usb stick (which can boot your
> main
> install, in my case on a usb stick, if you choose not to install the
> standard
> boot loader on your installed disk). So I had two ways of booting the usb
> stick.
> The syslinux boot kernel panics too.
>
> > It boots fine. When I added the disk drives later, they were recognized,
> and I
> > could configure them as I intended.
>
> I'm happy for you.
>
> > As to performance, once the OS gets loaded from USB, just about the only
> > access to the USB is to write log files.  There's plenty of RAM to cache
> the
> > OS file system, and to cache writes while they're waiting to get
> written.  In
> > my setup, the rate of writes to the USB is far less than its bandwidth,
> so I'm
> > having no performance trouble there.
>
> I'm glad to hear performance isn't a problem. I don't care about
> performance.
> Current usb sticks are fast enough and the files are only going to be read
> once
> and sit in cache (32G RAM) after that.
>
> This morning it occured to me that the difference in booting off a usb
> stick and
> a SATA drive is that I'm using the distribution's generic kernel, which
> likely
> won't have the usb drivers in it, but will load the usb drivers as modules
> later. (I used to make custom kernels with just the right drivers built
> into the
> kernel, but I gave up on this a while ago. Now I want installs that boot
> anywhere I put them.)
>
> So I made the generic initrd (which I've never needed to use), using the
> supplied script, and this time the kernel stops with
>
> can't mount /dev/sda1 on /mnt
>
> and drops me into a shell. This is a step forward.
>
> looking with ls, there are no /dev/sd*  in /dev
>
> I'm now going to mess around around with initrd files and as well build a
> kernel with all the usb drivers built in.
>
> If anyone knows the solution to the current situation I'd be glad to hear
> about
> it.
>
> Thanks Joe
>
> --
> Joseph Mack NA3T EME(B,D), FM05lw North Carolina
> jmack (at) wm7d (dot) net - azimuthal equidistant
> map generator at http://www.wm7d.net/azproj.shtml
> Homepage http://www.austintek.com/ It's GNU/Linux!
> --
> This message was sent to: dbrain at gmail.com <dbrain at gmail.com>
> To unsubscribe, send a blank message to trilug-leave at trilug.org from that
> address.
> TriLUG mailing list : https://www.trilug.org/mailman/listinfo/trilug
> Unsubscribe or edit options on the web  :
> https://www.trilug.org/mailman/options/trilug/dbrain%40gmail.com
> Welcome to TriLUG: https://trilug.org/welcome


More information about the TriLUG mailing list