Re: [arch-general] syslinux.cfg
On Wed, 15 Feb 2017 20:38:05 -0700, Leonid Isaev wrote: >Let's assume that you have the following: >* /dev/sda1 -- mounted at /boot when you boot your ArchLinux system >* /dev/sdb1 -- the same for Foo >* syslinux is installed on /dev/sda1 (it is bootable). > >What I usually do, is mkdir /dev/sda1/{arch,foo} and rsync >kernels/initrds from /dev/sda1 to arch/ and from /dev/sdb1 to foo/. >Then, modify syslinux.cfg so that entries like LINUX ../vmlinuz-linux >become LINUX ../arch/vmlinuz-linux and similarly for INITRD. Finally, >in your Arch's and Foo's fstabs, bind-mount arch/ and foo/ to >respective /boot's (if desired of course, as you don't need to >have /boot mounted). This way you get the menu that you mentioned >first. > >You no longer need data in /dev/sdb1 and can free the partition. Thank you, that is nice workaround, with just one pitfall. If I want to maintain the other Linux in a systemd-nspawn container, I won't be able to upgrade the kernel anymore [1]. Is there a workaround for this, too? Perhaps I'm just using systemd-nspawn incorrect :D. I should read more about systemd-nspawn ;). I wonder how systemd-nspawn works, if e.g. /home would be on a separated partition. Some days back I needed to use chroot, because installing GRUB (GRUB itself, not the grub package/s) didn't work with systemd-nspawn in the way I'm using systemd-nspawn. However, I most likely will use the workaround you mentioned. Regards, Ralf [1] [root@archlinux ~]# grep PRETTY /etc/os-release PRETTY_NAME="Arch Linux" [root@archlinux ~]# grep -v ^# /etc/fstab /dev/sda9 / ext4 rw,relatime,data=ordered 0 1 /dev/sda10 noneswap defaults 0 0 /dev/sda11 /mnt/music ext4 defaults,noatime 0 2 /dev/sda5 /home/s1.music ext4 defaults,noatime 0 2 [root@archlinux ~]# systemd-nspawn -qD /mnt/moonstudio [root@moonstudio ~]# grep PRETTY /etc/os-release PRETTY_NAME="Ubuntu 16.04.2 LTS" [root@moonstudio ~]# grep -v ^# /etc/fstab /dev/sdb11 / ext4rw,relatime 0 1 /dev/sda10 noneswapsw0 0 /dev/sdb7 noneswapsw0 0 /dev/sda9 /mnt/archlinux ext4defaults 0 2 /dev/sdb15 /mnt/winos7 ext4defaults,noatime 0 2 [root@moonstudio ~]# ls -hl /mnt/archlinux/ total 0 [root@moonstudio ~]# logout [root@archlinux ~]# systemd-nspawn -bqD /mnt/moonstudio [snip] [root@moonstudio ~]# ls -hl /mnt/archlinux/ total 0 [root@moonstudio ~]# ls -hl /mnt/winos7/ total 0
[arch-general] [solved] syslinux.cfg
On Wed, 15 Feb 2017 20:38:05 -0700, Leonid Isaev wrote: >What I usually do, is mkdir /dev/sda1/{arch,foo} and rsync >kernels/initrds from /dev/sda1 to arch/ and from /dev/sdb1 to foo/. Hi, I kept Arch's /boot and will move other Linux /boot to an Arch directory named /.boot. A test done with one Linux already works, just the issue with installing and removing another Linux' kernels when maintaining it in a systemd-nspawn container isn't solved. Regards, Ralf [root@archlinux ~]# ls -d /boot/ /.boot/*/*/ /boot/ /.boot/ubuntu_moonstudio/boot/ [root@archlinux ~]# grep boot /mnt/moonstudio/etc/fstab /mnt/archlinux/.boot/ubuntu_moonstudio/boot /boot none bind 0 0 [root@archlinux ~]# cat /boot/syslinux/syslinux.cfg # http://syslinux.zytor.com/wiki/index.php/Doc/menu PROMPT 0 TIMEOUT 80 UI menu.c32 MENU HIDDEN MENU CLEAR MENU COLOR screen 0;30;40 MENU COLOR border 0;30;40 MENU COLOR title 1;37;44 MENU COLOR unsel 0;37;40 MENU COLOR hotkey 1;37;40 MENU COLOR hotsel 7;37;40 MENU COLOR sel 7;37;40 MENU COLOR disabled1;37;40 MENU COLOR scrollbar 0;30;40 MENU COLOR tabmsg 0;30;40 MENU COLOR cmdmark 0;31;40 MENU COLOR cmdline 0;37;40 MENU COLOR timeout_msg 0;37;40 MENU COLOR timeout 1;37;40 # Used hotkeys: ^A ^e ^g ^H ^L ^M ^O ^P ^Q ^R ^S ^t ^V DEFAULT Threadirqs MENU TITLE HAL 9000 LABEL Toolbox MENU LABEL Toolbox MENU DISABLE MENU SEPARATOR LABEL Hardware MENU LABEL ^Hardware Detection COM32 hdt.c32 LABEL Reset MENU LABEL R^eset COM32 reboot.c32 LABEL Off MENU LABEL Power ^Off COM32 poweroff.c32 MENU SEPARATOR MENU SEPARATOR LABEL Arch Menu MENU LABEL Arch Linux MENU DISABLE MENU SEPARATOR LABEL Threadirqs MENU LABEL Arch Linux ^threadirqs LINUX ../vmlinuz-linux APPEND root=LABEL=archlinux ro threadirqs INITRD ../initramfs-linux.img LABEL Rosa MENU LABEL Arch Linux Rt ^Rosa Pluesch LINUX ../vmlinuz-linux-rt-rosaplüsch APPEND root=LABEL=archlinux ro INITRD ../initramfs-linux-rt-rosaplüsch.img LABEL Presonus MENU LABEL Arch Linux Rt ^Presonus LINUX ../vmlinuz-linux-rt-presonus APPEND root=LABEL=archlinux ro INITRD ../initramfs-linux-rt-presonus.img LABEL Arch MENU LABEL ^Arch Linux LINUX ../vmlinuz-linux APPEND root=LABEL=archlinux ro INITRD ../initramfs-linux.img LABEL Rt MENU LABEL Arch ^Linux Rt LINUX ../vmlinuz-linux-rt APPEND root=LABEL=archlinux ro INITRD ../initramfs-linux-rt.img LABEL Lts MENU LABEL Arch Linux Rt LT^S LINUX ../vmlinuz-linux-rt-lts APPEND root=LABEL=archlinux ro INITRD ../initramfs-linux-rt-lts.img MENU SEPARATOR MENU SEPARATOR LABEL Other Menu MENU LABEL Other Linux MENU DISABLE MENU SEPARATOR LABEL Moonstudio MENU LABEL Ubuntu X ^Moonstudio lowlatency LINUX /.boot/ubuntu_moonstudio/boot/vmlinuz-lowlatency APPEND root=LABEL=moonstudio ro vga=773 INITRD /.boot/ubuntu_moonstudio/boot/initrd.img-lowlatency LABEL Generic MENU LABEL Ubuntu X Moonstudio ^generic LINUX /.boot/ubuntu_moonstudio/boot/vmlinuz-generic APPEND root=LABEL=moonstudio ro vga=773 INITRD /.boot/ubuntu_moonstudio/boot/initrd.img-generic #LABEL Light #MENU LABEL Ubuntu ^Q LightScribe Rt #LINUX /.boot/ubuntu_q/boot/vmlinuz-3.6.5-rt14 #APPEND root=LABEL=q ro #INITRD /.boot/ubuntu_q/boot/initrd.img-3.6.5-rt14 #LABEL Suse #MENU LABEL ^Vintage SUSE 11.2 Rt #LINUX /.boot/suse11.2/boot/vmlinuz-2.6.31.6-rt19 #APPEND root=LABEL=suse11.2 ro #INITRD /.boot/suse11.2/boot/initrd-2.6.31.6-rt19
Re: [arch-general] syslinux.cfg
On Thu, Feb 16, 2017 at 11:20:58AM +0100, Ralf Mardorf wrote: > If I want to maintain the other Linux in a systemd-nspawn container, I > won't be able to upgrade the kernel anymore [1]. Is there a workaround > for this, too? Perhaps I'm just using systemd-nspawn incorrect :D. I > should read more about systemd-nspawn ;). If your linux installation has a non-trivial fstab, for instance separate /var or /var/log, I don't think a container would even boot because the devices /dev/sdXY are not there. So, you'll need to find a way to properly mount all necessary filesystems inside the container. I have never used nspawn, but the above is possible with LXC because one can write a container configuration file. If nspawn has a decent configuration syntax, then good... I also wouldn't make a habit of maintaining another linux distro like that especially if it is systemd-based. Systemd may not run smth if it detect a container virtualization. Cheers, -- Leonid Isaev