View previous topic :: View next topic |
Author |
Message |
bmike1 n00b
Joined: 05 Sep 2021 Posts: 22
|
Posted: Sun Sep 05, 2021 7:46 pm Post subject: Install the OS on usb |
|
|
Here is what I want to do: I want to install gentoo onto a USB stick, being able to write to it, . Then to build it on my computer if I like it. Can you lead me to the thread that describes HOw to do that (I'm sure it has been asked before). |
|
Back to top |
|
|
alamahant Advocate
Joined: 23 Mar 2019 Posts: 3916
|
Posted: Sun Sep 05, 2021 8:52 pm Post subject: |
|
|
Welcome to Gentoo forums!
Plz treat the usb as a normal drive and perform an absolutely normal ordinary install like if it were an ssd using another Gentoo system or other linux as host.
Then if you like it,use
rsync -aAXv /mnt/source/ /mnt/dest/
You will have to update fstab initramfs and reinstall and update grub. _________________
|
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54577 Location: 56N 3W
|
Posted: Sun Sep 05, 2021 9:02 pm Post subject: |
|
|
alamahant,
What about root on the USB stick?
How do you do rootwait for the real root if you use an initrd?
My solution was to not use an initrd. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
alamahant Advocate
Joined: 23 Mar 2019 Posts: 3916
|
Posted: Sun Sep 05, 2021 9:09 pm Post subject: |
|
|
Neddy
so initrd does not work with usb installs?
I didnt know that as usual.
bmike1
Please diregard my comment about using initrd and follow Neddy's advice.
Thanks Neddy
_________________
|
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54577 Location: 56N 3W
|
Posted: Sun Sep 05, 2021 9:25 pm Post subject: |
|
|
alamahant,
I've never tried an initrd with root on on USB.
I have seen a few posts here with that problem though. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
bmike1 n00b
Joined: 05 Sep 2021 Posts: 22
|
Posted: Sun Sep 05, 2021 11:46 pm Post subject: |
|
|
Thank you so much for the quick answers. What I'm going to do is install to the usb and then install from the usb to the NUC (my computer).There are ssooooo many packages I don't use. They just take up space. Might as well get rid of them! |
|
Back to top |
|
|
misphit n00b
Joined: 20 Jun 2017 Posts: 7 Location: 3 m below sealevel
|
Posted: Mon Sep 06, 2021 1:14 am Post subject: |
|
|
bmike1,
As far as I know it is possible to install gentoo on a USB stick.
At least, I have done so in the past.
The way to approach this is to build an intramfs into the kernel, so basically you make a self booting kernel.
You must first construct an initramfs, I believe there is a gentoo wikipage for it.
You should read it, it is largely accurate.
Then the kernel needs to be configured to store your initramfs.
go to the kernel sources and start "make menuconfig"
in "general setup" give the sourcepath of your initramfs.
Then in "processor type and features" enable the "built in kernel command line"
Mine says:" vga=0x31b dolvm real_root=/dev/whatever rootfstype=ext4 real_init=/sbin/init net ifnames=0 "
The kernel will then make a cpio archive and boot it with the arguments you have given it in the kernel command line.
No more dracut.
Mind that you can also make your stick EFI bootable, which has an added bonus of getting rid of grub.
The system BIOS makes no difference between block devices, as long as it can find an EFI partition.
HTH, misphit |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54577 Location: 56N 3W
|
Posted: Mon Sep 06, 2021 8:12 am Post subject: |
|
|
bmike1,
It would be easier for a bootable install to install Gentoo into VirtualBox as a guest on some ramdom amd64 host.
You won't be able to just copy the Gentoo to a new home. There is some setup to do too.
The usual way to achieve whet you are intending is to use another Gentoo install to make binary packages for the NUC and use emerge -K on the NUC to install the binaries, so the weaker machine does not do any building. You can use a USB stick to store the binaries.
The same process works for updates.
There are some complications around what host do you build for?
The NUC or the build host or a generic amd64 but that's for another post if you decide to go that way. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
bmike1 n00b
Joined: 05 Sep 2021 Posts: 22
|
Posted: Mon Sep 06, 2021 3:45 pm Post subject: |
|
|
alamahant wrote: | Welcome to Gentoo forums!
Plz treat the usb as a normal drive and perform an absolutely normal ordinary install like if it were an ssd using another Gentoo system or other linux as host.
Then if you like it,use
rsync -aAXv /mnt/source/ /mnt/dest/
You will have to update fstab initramfs and reinstall and update grub. |
can I use my installed OS to install gentoo to the USB?
Last edited by bmike1 on Mon Sep 06, 2021 4:13 pm; edited 2 times in total |
|
Back to top |
|
|
alamahant Advocate
Joined: 23 Mar 2019 Posts: 3916
|
Posted: Mon Sep 06, 2021 3:49 pm Post subject: |
|
|
Quote: |
cam I use my istalled OS to install gentoo to the USB?
|
Of course.
This is the preferable way.
If your OS is Linux. _________________
|
|
Back to top |
|
|
figueroa Advocate
Joined: 14 Aug 2005 Posts: 3005 Location: Edge of marsh USA
|
Posted: Tue Sep 07, 2021 4:01 am Post subject: |
|
|
If you are going to consider using rsync to copy Gentoo from one place to another, you may want to see the following:
https://wiki.archlinux.org/index.php/rsync#Full_system_backup _________________ Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi |
|
Back to top |
|
|
|