Installing Gentoo: Difference between revisions
Jump to navigation
Jump to search
(added note on the CFLAGS to not use -pipe on low RAM machines) |
(Guide to install Gentoo on Xen) |
||
| Line 1: | Line 1: | ||
{{warning|This guide is currently a work in progress. You should not expect it to work or be correct. Please see the [[Talk:Installing_Gentoo|discussion page]] for some areas where it might be improved.}} | {{warning|This guide is currently a work in progress. You should not expect it to work or be correct. Please see the [[Talk:Installing_Gentoo|discussion page]] for some areas where it might be improved.}} | ||
{{warning|This guide assumes that you’re already comfortable with Linux in general and Gentoo in particular.}} | |||
==Installation== | |||
First thing is to boot in [[rescue]] mode from the Xen shell and to create <code>/mnt/gentoo/</code>. | |||
Then, you can follow the [https://wiki.gentoo.org/wiki/Handbook:AMD64 official handbook] with those modifications: | |||
<ul> | |||
<li><code>/dev/sda</code> is <code>/dev/xvda</code></li> | |||
<li>The IP to configure on eth0 is ${prefix}::2/64 and the gateway is ${prefix}::1. For example, this is my configuration: | |||
< | <pre>config_eth0="85.119.83.7/21 2001:ba8:1f1:f0af::2/64" | ||
<li> | routes_eth0="default via 85.119.80.1 | ||
default via 2001:ba8:1f1:f0af::1"</pre> | |||
<li> | </li> | ||
<pre> | <li>For IPv4, pick the configuration from the live system</li> | ||
<li>For the kernel configuration, you have to enable the Xen support. Those options worked for me: | |||
<pre>rr2 ~ # grep -i xen /usr/src/linux-4.19.97-gentoo/.config | |||
CONFIG_XEN=y | CONFIG_XEN=y | ||
CONFIG_XEN_PV=y | |||
CONFIG_XEN_PV_SMP=y | |||
CONFIG_XEN_512GB=y | |||
CONFIG_XEN_SAVE_RESTORE=y | CONFIG_XEN_SAVE_RESTORE=y | ||
# CONFIG_XEN_DEBUG_FS is not set | |||
CONFIG_XEN_BLKDEV_FRONTEND=y | CONFIG_XEN_BLKDEV_FRONTEND=y | ||
# CONFIG_XEN_SCSI_FRONTEND is not set | |||
CONFIG_XEN_NETDEV_FRONTEND=y | CONFIG_XEN_NETDEV_FRONTEND=y | ||
CONFIG_INPUT_XEN_KBDDEV_FRONTEND=y | |||
CONFIG_HVC_XEN=y | CONFIG_HVC_XEN=y | ||
CONFIG_HVC_XEN_FRONTEND=y | CONFIG_HVC_XEN_FRONTEND=y | ||
# CONFIG_XEN_WDT is not set | |||
CONFIG_DRM_XEN=y | |||
CONFIG_DRM_XEN_FRONTEND=m | |||
CONFIG_XEN_FBDEV_FRONTEND=y | CONFIG_XEN_FBDEV_FRONTEND=y | ||
# Xen driver support | |||
CONFIG_XEN_BALLOON=y | CONFIG_XEN_BALLOON=y | ||
CONFIG_XEN_SCRUB_PAGES_DEFAULT=y | |||
CONFIG_XEN_DEV_EVTCHN=y | CONFIG_XEN_DEV_EVTCHN=y | ||
CONFIG_XENFS=y | CONFIG_XENFS=y | ||
| Line 38: | Line 44: | ||
CONFIG_XEN_GNTDEV=m | CONFIG_XEN_GNTDEV=m | ||
CONFIG_XEN_GRANT_DEV_ALLOC=m | CONFIG_XEN_GRANT_DEV_ALLOC=m | ||
# CONFIG_XEN_GRANT_DMA_ALLOC is not set | |||
CONFIG_SWIOTLB_XEN=y | |||
# CONFIG_XEN_PVCALLS_FRONTEND is not set | |||
CONFIG_XEN_PRIVCMD=y | CONFIG_XEN_PRIVCMD=y | ||
CONFIG_XEN_HAVE_PVMMU=y | CONFIG_XEN_HAVE_PVMMU=y | ||
</pre> | CONFIG_XEN_HAVE_VPMU=y</pre> | ||
</li> | |||
<li>Add <code>co:2345:respawn:/sbin/agetty hvc0 115200 linux</code> to <code>/etc/inittab</code> for the Xen console</li> | |||
</ul> | |||
<li> | |||
< | |||
< | |||
< | |||
</ | |||
</li> | |||
</ | |||
==Misc== | |||
If you have questions, I’m on the [https://panel.bitfolk.com/fun/ IRC channel] as alarig. | |||
I used https://www.mad-hacking.net/documentation/linux/deployment/xen/pv-guest-basics.xml to know what the Xen options are for. | |||
Revision as of 20:36, 31 March 2020
| This guide is currently a work in progress. You should not expect it to work or be correct. Please see the discussion page for some areas where it might be improved. |
| This guide assumes that you’re already comfortable with Linux in general and Gentoo in particular. |
Installation
First thing is to boot in rescue mode from the Xen shell and to create /mnt/gentoo/.
Then, you can follow the official handbook with those modifications:
/dev/sdais/dev/xvda- The IP to configure on eth0 is ${prefix}::2/64 and the gateway is ${prefix}::1. For example, this is my configuration:
config_eth0="85.119.83.7/21 2001:ba8:1f1:f0af::2/64" routes_eth0="default via 85.119.80.1 default via 2001:ba8:1f1:f0af::1"
- For IPv4, pick the configuration from the live system
- For the kernel configuration, you have to enable the Xen support. Those options worked for me:
rr2 ~ # grep -i xen /usr/src/linux-4.19.97-gentoo/.config CONFIG_XEN=y CONFIG_XEN_PV=y CONFIG_XEN_PV_SMP=y CONFIG_XEN_512GB=y CONFIG_XEN_SAVE_RESTORE=y # CONFIG_XEN_DEBUG_FS is not set CONFIG_XEN_BLKDEV_FRONTEND=y # CONFIG_XEN_SCSI_FRONTEND is not set CONFIG_XEN_NETDEV_FRONTEND=y CONFIG_INPUT_XEN_KBDDEV_FRONTEND=y CONFIG_HVC_XEN=y CONFIG_HVC_XEN_FRONTEND=y # CONFIG_XEN_WDT is not set CONFIG_DRM_XEN=y CONFIG_DRM_XEN_FRONTEND=m CONFIG_XEN_FBDEV_FRONTEND=y # Xen driver support CONFIG_XEN_BALLOON=y CONFIG_XEN_SCRUB_PAGES_DEFAULT=y CONFIG_XEN_DEV_EVTCHN=y CONFIG_XENFS=y CONFIG_XEN_COMPAT_XENFS=y CONFIG_XEN_SYS_HYPERVISOR=y CONFIG_XEN_XENBUS_FRONTEND=y CONFIG_XEN_GNTDEV=m CONFIG_XEN_GRANT_DEV_ALLOC=m # CONFIG_XEN_GRANT_DMA_ALLOC is not set CONFIG_SWIOTLB_XEN=y # CONFIG_XEN_PVCALLS_FRONTEND is not set CONFIG_XEN_PRIVCMD=y CONFIG_XEN_HAVE_PVMMU=y CONFIG_XEN_HAVE_VPMU=y
- Add
co:2345:respawn:/sbin/agetty hvc0 115200 linuxto/etc/inittabfor the Xen console
Misc
If you have questions, I’m on the IRC channel as alarig.
I used https://www.mad-hacking.net/documentation/linux/deployment/xen/pv-guest-basics.xml to know what the Xen options are for.