Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Trying to build a live USB using unetbootin...
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
creighto
n00b
n00b


Joined: 21 Feb 2018
Posts: 49
Location: Louisville, Kentucky, USA

PostPosted: Wed Feb 21, 2018 6:10 am    Post subject: Trying to build a live USB using unetbootin... Reply with quote

...via my iMac in order to use on my employer provided Dell Latitude. Before I bought this iMac in 2010, I used Gentoo Linux regularly, but I've been out of the loop for some time. (I prefer BlackboxWM, and would largely live inside the BASH command line, so I can manage again, I;m sure) So I downloaded unetbootin for iMac, but Gentoo isn't an option in the internal menu, despite both the unetbootin FAQ and the Gentoo website claiming that it should be there. What should I do? Is there a particular, current Gentoo ISO I can download to accomplish my goals? Or is the Gentoo iso intended for unetbootin special in some way? If I should use another method, should I partition the USB drive? How large should the boot partition be? How large should my USB drive be? I'm looking to get a 16gB low profile drive from Amazon, because it's quite cheap; but do I need a larger size?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54232
Location: 56N 3W

PostPosted: Wed Feb 21, 2018 10:16 am    Post subject: Reply with quote

creighto,

Welcome back.

First of all, don't use unetbootin nor the Gentoo LiveCD.
When the only tool you have is a hammer, every problem looks like a nail. :)

Use System Rescue CD, as its gentoo based, you can use it like the LiveCD and it can be copied to a USB stick.
System Rescue CD has other advantages too, which I admit you may or may not need.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
creighto
n00b
n00b


Joined: 21 Feb 2018
Posts: 49
Location: Louisville, Kentucky, USA

PostPosted: Wed Feb 21, 2018 3:48 pm    Post subject: Reply with quote

Okay, System Rescue Disk. But I shouldn't use Unetbootin to put it on the thumbdrive? Would doing things this way allow me a path to compile a kernel to match the laptop? And should I get the 32 gig thumbdrive for $4 more and partition it up? There is no way that this laptop needs swap for regular memory pages for most anything I might be doing with it in Gentoo (maybe Steam?) but does the sleep function require a swap partion? Would there be any value in creating an EXT2 partition?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54232
Location: 56N 3W

PostPosted: Wed Feb 21, 2018 4:10 pm    Post subject: Reply with quote

creighto,

I linked the instructions to put System Rescue CD onto a USB stick.
There are a number of ways to do it.

System Rescue CD will not take over the entire thumb drive.
Its root filesystem, in 2014, was a 274M file. I need to get an update.

The rest of the space is all yours. The only downside is that its a vfat filesystem.
You could make several partitions on the thumb drive, so it need not be a problem.

If you want to install Gentoo beside it, Gentoo will go into 40G for a full desktop, or less if you remove the source files as you go.
Some of the bigger packages need 8G of temporary space to build.
You cannot install gentoo onto a vfat filesystem as it does not support symbolic links.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
creighto
n00b
n00b


Joined: 21 Feb 2018
Posts: 49
Location: Louisville, Kentucky, USA

PostPosted: Thu Feb 22, 2018 7:38 pm    Post subject: Reply with quote

NeddySeagoon wrote:

Some of the bigger packages need 8G of temporary space to build.


Good God! What has happened in the GNU/Linux world since I've been away!? What packages would require that!?

Anyway, thank you Neddy. I wan't to ask you your opinion on my plan...

I ordered a low profile USB thumdrive with 32 Gigs, and I intend to partition it so that the first 4 or 8 gigs is FAT32, with the next partition being 24 gigs of EXT2 for Gentoo's entire file tree to live within. What I'm trying to decide is, should I take 4 gigs away from the FAT32 partition and make a swap partition (I have 8 gigs of real memory on this laptop) and/or should I commit 2 gigs to a dedicated install ISO partition? I need 4 gigs for the FAT32 partition, because I *may* need to transfer a file as large as a DVD ISO from Gentoo to Windows, but I will never need more than that. I imagine that I could use the FAT32 partition to hold the install ISOs temporarily as well. So, really my question is, should I bother with a swap partition on a USB drive for a machine with 8 Gigs? I can't commit 8 gigs of swap space for hibernation, so that won't matter much.

Once I have the thumbdrive partitioned in this manner, should I just use the minimum install ISO, with the intent of installing directly to the thumbdrive? Can I use the minimum install ISO to partition the thumbdrive itself? So that I don't need to worry about partitioning in advance? As best as I can remember, I could partition my drives fine with the older Gentoo install methods; but I've never tried to install to removable storage before.
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 8935

PostPosted: Thu Feb 22, 2018 7:43 pm    Post subject: Reply with quote

LibreOffice, Chromium, QtWebEngine, ...
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54232
Location: 56N 3W

PostPosted: Thu Feb 22, 2018 8:07 pm    Post subject: Reply with quote

creighto,

Leave out swap for now and see what happens.
You can add a swap file later, if you find you need it.

I think you can hibernate to a file these days too, so you may be able to multitask your build space as its only actually required (for building) while a build is in progress.

Start the install using System Rescue CD You can even install it to your thumb drive and boot from there.
It uses syslinux as its boot loader, you will be able to add Gentoo there.

System Rescue CD is Gentoo based and allows the handbook to be followed without any extra steps.
It also provides an optional GUI.

You don't need System Rescue CD on your 32G drive. Any USB will do. It even works from a CD :).

You do need to do the partitioning and making filesystems from some other drive ... not the one you are partitioning and making filesystems on.

On a USB stick, the Gentoo repository may take up 2G. Its mostly wasted space as its a large number of small files
The Gentoo repository is also available as a squashfs image. Then its about 80Mb.
The kernel is another space hog, for the same reason.

I have a full working Gentoo desktop (Xfce4, firefox, libreoffice, 1.5G swap and 500Mb free, on an 8G SSD.
It doesn't build there, it only runs there. Is that an option for you too?
There is no /usr/src, no /usr/portage and no build space on the running install. That's for my Acer One netbook.

Does this USB stick need to run on any 64 bit CPU?
It matters as it affects some early set up. If you get it wrong, you will need to rebuild everything.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
creighto
n00b
n00b


Joined: 21 Feb 2018
Posts: 49
Location: Louisville, Kentucky, USA

PostPosted: Thu Feb 22, 2018 8:18 pm    Post subject: Reply with quote

asturm wrote:
LibreOffice, Chromium, QtWebEngine, ...


Oh, good. I'm fine then. I don't need any of those.
Back to top
View user's profile Send private message
creighto
n00b
n00b


Joined: 21 Feb 2018
Posts: 49
Location: Louisville, Kentucky, USA

PostPosted: Thu Feb 22, 2018 8:29 pm    Post subject: Reply with quote

NeddySeagoon wrote:


On a USB stick, the Gentoo repository may take up 2G. Its mostly wasted space as its a large number of small files
The Gentoo repository is also available as a squashfs image. Then its about 80Mb.


That's awesome. I don't know anything about squashfs though. I was thinking that I'd need to learn how to set up /tmp (and others?) as a ramdisk, to keep fast moving files from actually swapping to flash chips.

Quote:


I have a full working Gentoo desktop (Xfce4, firefox, libreoffice, 1.5G swap and 500Mb free, on an 8G SSD.
It doesn't build there, it only runs there. Is that an option for you too?


Not really. Not unless I can use one of my older usb drives for that purpose. I'm trying to use this company owned laptop, but for ethical reasons, I don't want to touch the local storage at all. If there were a way to add another solid state drive, even a little one, I'd do it that way; but as far as I can tell it only has one slot for an ePCI SSD.

Quote:
.

Does this USB stick need to run on any 64 bit CPU?
It matters as it affects some early set up. If you get it wrong, you will need to rebuild everything.


It's a single laptop with an Intel i7 processor. My understanding is that I can use it in either 32 or 64 bit mode. I was planning to stick with 32 bit everything.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54232
Location: 56N 3W

PostPosted: Thu Feb 22, 2018 9:03 pm    Post subject: Reply with quote

creighto,

With 8G RAM, do a 64 bit install. A 32bit install has to resort to tricks to use more than 4G of your RAM and you get at best, 3G per process as you still have a 4G virtual memory map and its a really bad idea not to map the kernel :)

With 8G of RAM, you can build most things in RAM too.
If your build space is /var/tmp/portage, mount tmpfs there. If something won't fit, there are several options.

/tmp is in tmpfs by default these days. tmpfs is like a RAMdisk. It has a default maximum size of half RAM but no space is reserved. Its reserved as its allocated.
You can resize it 'on the fly' if you need to.
That saves lots of writes that will never be read.

A squashfs is a read only compressed filesystem in a file. You need kernel support for loopback filesystems and squashfs.
Its something you can add later if you want the space.

There is no reason for an install to be on a single drive. *NIX doesn't care. It puts the filesystem tree together as described in /etc/fstab.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
creighto
n00b
n00b


Joined: 21 Feb 2018
Posts: 49
Location: Louisville, Kentucky, USA

PostPosted: Thu Feb 22, 2018 11:28 pm    Post subject: Reply with quote

NeddySeagoon wrote:
creighto,

With 8G RAM, do a 64 bit install. A 32bit install has to resort to tricks to use more than 4G of your RAM and you get at best, 3G per process as you still have a 4G virtual memory map and its a really bad idea not to map the kernel :)


Umm, how big is the kernel these days? I was hoping to compile the kernel to exactly the hardware on this laptop, cutting out all the fat I could and hopefully avoid using modules altogether. Are you saying that is no longer possible?

Quote:


With 8G of RAM, you can build most things in RAM too.
If your build space is /var/tmp/portage, mount tmpfs there.

If something won't fit, there are several options.

/tmp is in tmpfs by default these days. tmpfs is like a RAMdisk. It has a default maximum size of half RAM but no space is reserved. Its reserved as its allocated.
You can resize it 'on the fly' if you need to.
That saves lots of writes that will never be read.


That sounds great for my purpose, but I'm not entirely sure I understand what you are suggesting here. Are you saying that when I build Gentoo, /tmp is automaticly a ramdrive? Can I just alias/symlink /var/tmp/portage/ to /tmp?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54232
Location: 56N 3W

PostPosted: Thu Feb 22, 2018 11:56 pm    Post subject: Reply with quote

creighto,

tmpfs is like a RAM drive only better. My kernels are about 5.5B but thats compressed and includes all the startup stuff that is thrown away after its used.
Code:
-rw-r--r-- 1 root root 5.5M Dec  3 11:22 4.15.0-rc1-gentoo-static
-rw-r--r-- 1 root root 5.5M Jan  6 13:28 4.15.0-rc4-gentoo-static
-rw-r--r-- 1 root root 5.6M Jan 15 16:05 4.15.0-rc8-gentoo-static
-rw-r--r-- 1 root root 5.7M Feb 18 15:34 4.16.0-rc1-static


I have about 12 modules. Mostly for things I don't use often. I use VirtualBox which needs out of kernel modules, so I can't turn off module loading.

/tmp is automatically in tmpfs unless you change it.
Code:
$ df -Th
Filesystem               Type      Size  Used Avail Use% Mounted on
/dev/shm                 tmpfs      16G     0   16G   0% /tmp
/dev/shm                 tmpfs      16G  6.1M   16G   1% /var/tmp/portage

If you want /var/tmp/portage in tmpfs you need to mount it there.
/tmp and /var/tmp/portage should have different permissions, so I symlink should not be used.

Code:
$ mount
/dev/shm on /tmp type tmpfs (rw,nosuid,nodev,noexec,noatime)
/dev/shm on /var/tmp/portage type tmpfs (rw,noatime)
The build system will want to run things in /var/tmp/portage but /tmp is mounted with noexec.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
creighto
n00b
n00b


Joined: 21 Feb 2018
Posts: 49
Location: Louisville, Kentucky, USA

PostPosted: Fri Mar 09, 2018 8:01 pm    Post subject: Reply with quote

Well, I'm giving up on this path because the bios security implemented by my company is too good, and I'm not willing to break their equipment. Instead, I found a used Toshiba laptop on craigslist for $20, because it's fairly old and it has developed a windoze fatal error. I will open a new thread for my new questions. Thanks for everyone's help.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum