public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] gentoo and kickstart files
@ 2020-11-21 21:26 Jude DaShiell
  2020-11-22  8:12 ` Dan Egli
  0 siblings, 1 reply; 5+ messages in thread
From: Jude DaShiell @ 2020-11-21 21:26 UTC (permalink / raw
  To: gentoo-user

Does gentoo know about kickstart files and can it use them?



-- United States has 633 Billionaires with only 10 doing any annual
significant giving.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [gentoo-user] gentoo and kickstart files
  2020-11-21 21:26 [gentoo-user] gentoo and kickstart files Jude DaShiell
@ 2020-11-22  8:12 ` Dan Egli
  2020-11-22  8:32   ` Ozgur
  2020-11-22 10:12   ` Neil Bothwick
  0 siblings, 2 replies; 5+ messages in thread
From: Dan Egli @ 2020-11-22  8:12 UTC (permalink / raw
  To: gentoo-user, Jude DaShiell

On 11/21/2020 2:26 PM, Jude DaShiell wrote:
> Does gentoo know about kickstart files and can it use them?
>
>

I'm hardly a Gentoo expert, but I'm going to say no on both. Kickstart 
files are designed for the particular installer you're using. I know 
that a Kickstart file for Fedora won't work on Ubuntu, or even CentOS. 
The issue here is that Gentoo doesn't HAVE an installer. Not like SUSe's 
YaST or Fedora's anaconda. So there is no program to feed a kickstart 
file to. The best thing you can do to make things similiar between hosts 
is to create your own script that partitions the disks, formats them, 
mounts them, then proceeds to copy custom files across. Just off the top 
of my head, it would look something like this, assuming you are using 
GPT partitions on a single drive with separate /home partition, with / 
and /home formatted as ext4:

#!/bin/sh
echo -e "g\nn\n1\n\n+1G\nn\n2\n\n+64G\nn\n\n\nt\n1\n1\nw" | fdisk /dev/sda
mkfs.vfat -F32 /dev/sda1
mkfs.ext4 /dev/sda2
mkfs.ext4 /dev/sda3
mount /dev/sda3 /mnt/gentoo
cd /mnt/gentoo
tar xvfJ /mnt/cdrom/stage3*.xz
for D in proc sys dev tmp; do
    mount --rbind /$D $D
    mount --make-rslave $D;
done
cp /mnt/cdrom/use/* /etc/portage/package.use
cp /mnt/cdrom/world /mnt/cdrom/chrooted .
cp /mnt/cdrom/make.conf etc/portage
cp /etc/resolv.conf etc
chroot . chrooted


And then chrooted would look like this:
. /etc/profile
PKGS=$(cat /world)emerge-webrsync
emerge -f $PKGS
emerge $PKGS
if [ -d /etc/systemd/system ] ; then
# using systemd, so let's use systemctl to set the boot programs
    systemctl daemon-reload
    systemctl enable <packages to load on boot> ;
else
# using openrc instead
   for P in <packages to load on boot>; do rc-update add $P default; done ;
fi
genkernel --menuconfig all
grub2-config -o /boot/grub/grub.cfg



And of course, world is what you want listed in the world file. The 
easiest way to do that part is to copy the /var/lib/portage/world file 
to the install media (that's where "world" came from above"). If you're 
not familiar with fdisk commands, what happens is this:
1) make new gpt partition label on the drive
2) make a new 1G partition (this will be /boot/EFI)
3) make a new 64GB partition (this will be /)
4) make a partition using all remaining space (/home)
5) flag partition 1 as an ESP (EFI System Partition). Probably not 
needed, but better safe than sorry.
6) write the changes to disk and exit

The following files are assumed to be in /root of the install media 
(automatically mounted on /mnt/cdrom):
world - the world file containing the base packages you want. We will 
let portage sort out any dependancies
stage3*.xz - wild card to represent your stage3 tarball.
chrooted - script to run in the chrooted environment
make.conf - the make.conf you want to have.

Also, the directory use should exist on the media. This directory will 
contain the files that automatically get copied to 
/etc/portage/package.use in the first script.

That's off the top of my head, and may very well be missing some steps, 
but you get the idea.


-- 

Dan Egli
 From my Test Server


-- 
This email has been checked for viruses by AVG.
https://www.avg.com



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [gentoo-user] gentoo and kickstart files
  2020-11-22  8:12 ` Dan Egli
@ 2020-11-22  8:32   ` Ozgur
  2020-11-22 10:12   ` Neil Bothwick
  1 sibling, 0 replies; 5+ messages in thread
From: Ozgur @ 2020-11-22  8:32 UTC (permalink / raw
  To: gentoo-user@lists.gentoo.org, Jude DaShiell

[-- Attachment #1: Type: text/html, Size: 4334 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [gentoo-user] gentoo and kickstart files
  2020-11-22  8:12 ` Dan Egli
  2020-11-22  8:32   ` Ozgur
@ 2020-11-22 10:12   ` Neil Bothwick
  2020-11-23  7:05     ` Gerrit Kuehn
  1 sibling, 1 reply; 5+ messages in thread
From: Neil Bothwick @ 2020-11-22 10:12 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 861 bytes --]

On Sun, 22 Nov 2020 01:12:10 -0700, Dan Egli wrote:

> > Does gentoo know about kickstart files and can it use them?
> 
> I'm hardly a Gentoo expert, but I'm going to say no on both. Kickstart 
> files are designed for the particular installer you're using. I know 
> that a Kickstart file for Fedora won't work on Ubuntu, or even CentOS. 
> The issue here is that Gentoo doesn't HAVE an installer. Not like
> SUSe's YaST or Fedora's anaconda. So there is no program to feed a
> kickstart file to. The best thing you can do to make things similiar
> between hosts is to create your own script that partitions the disks,
> formats them, mounts them, then proceeds to copy custom files across.

ISTR someone was working on an Ansible playbook to automate installation.


-- 
Neil Bothwick

I used to live in the real world, but I got evicted.

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [gentoo-user] gentoo and kickstart files
  2020-11-22 10:12   ` Neil Bothwick
@ 2020-11-23  7:05     ` Gerrit Kuehn
  0 siblings, 0 replies; 5+ messages in thread
From: Gerrit Kuehn @ 2020-11-23  7:05 UTC (permalink / raw
  To: gentoo-user


On Sun, 22 Nov 2020 10:12:47 +0000
Neil Bothwick <neil@digimed.co.uk> wrote:

> ISTR someone was working on an Ansible playbook to automate
> installation.

One of these?
https://github.com/stefangweichinger/ansible-gentoo
https://github.com/grizz/ansible-gentoo
https://github.com/agaffney/ansible-gentoo_install


cu
  Gerrit


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-11-23  7:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-21 21:26 [gentoo-user] gentoo and kickstart files Jude DaShiell
2020-11-22  8:12 ` Dan Egli
2020-11-22  8:32   ` Ozgur
2020-11-22 10:12   ` Neil Bothwick
2020-11-23  7:05     ` Gerrit Kuehn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox