Re: [blfs-dev] Thinking about a new LFS Live CD/iso
On 05/25/16 20:37, Bruce Dubbs wrote: Tim Tassonis wrote: Hi Bruce On 04/18/16 22:24, Bruce Dubbs wrote: I've been thinking thinking about a new Live CD/Rescue CD based on LFS. It would be much less ambitious than the old one that included an X implementation. If you are interested, I can send you my scripts to do all this, but maybe you already have a better solution for all the booting/root disk stuff in place. I've dropped the ball on this and am working on other things right now. One issue I came across in my earlier review was the problem of writable partitions from a CD/DVD. It just seems like a kludge. The old iso is not capable of being loaded on a thumb drive without some modifications and I haven't figured that out yet. I then thought how the CD/DVD paradigm is so last decade. I think it would be much easier to produce an iso that targets a thumb drive only. Users could then add packages as they see fit. Comments? A thumb drive solution of of course would be much easier, as you could get rid of all the initrd/squashfs stuff. You'd only need two partitions on the thumb drive, an iso boot partition which then would mount a regular ext4 partition on the same drive by partionid directly, without any need of indirection. I could provide this alternative in the hint too, it's really the easiest case, requiring no initrd/squashfs/overlayfs magic. Kind regards Tim -- Bruce -- decentral.ch - IT Stuff Tim Tassonis Dennlerstasse 36 8047 Zürich st...@decentral.ch +41 79 229 36 17 -- http://lists.linuxfromscratch.org/listinfo/blfs-dev FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
Re: [blfs-dev] Thinking about a new LFS Live CD/iso
On 05/25/16 14:37, Bruce Dubbs wrote: I then thought how the CD/DVD paradigm is so last decade. I think it would be much easier to produce an iso that targets a thumb drive only. Users could then add packages as they see fit. Comments? -- Bruce From a user's perspective, I definitely like the idea of targeting a thumb drive instead of CD/DVD. Paul -- http://lists.linuxfromscratch.org/listinfo/blfs-dev FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
Re: [blfs-dev] Thinking about a new LFS Live CD/iso
Tim Tassonis wrote: Hi Bruce On 04/18/16 22:24, Bruce Dubbs wrote: I've been thinking thinking about a new Live CD/Rescue CD based on LFS. It would be much less ambitious than the old one that included an X implementation. What I had in mind is a base LFS system with the following: dhcpcd wget ssh/ssl which links screen mc gptfdisk gpm LFS HTML LFS sources tarball What else? Other possibilities: unzip subversion git wireless-tools wpa-supplicant -- Bruce I have created such a disk, mainly as a rescue disk. I also added: - bind, the client parts for nslookup - net-tools, as I'm just more used to them - llvm, mdadm, good if used on a system where lvm/RAID is used - cpio - pciutils - parted In order to create the cd, I also needed: - libburn, libisoburn, libisofs - squashfs - syslinux/isolinux My approach was to create a cd with isofs that runs a kernel with an initramfs. The initramfs stuff is pretty identical to the blfs one. Also on the CD, there is a squashfs file, containing all the stuff you want on your live system. In the initramfs's init, I mount the squashfs combined with an overlayfs, to get a writable root partition, with the writable parts in a tmpfs. This looks like this: mknod /dev/loop0 b 7 0 mkdir /.root mkdir /mnt mkdir /mnt/gaia-ro mkdir /mnt/gaia-rw mount -t tmpfs tmpfs /mnt/gaia-rw mkdir /mnt/gaia-rw/work mkdir /mnt/gaia-rw/upper mkdir /mnt/gaia mount /gaiarule.sqf /mnt/gaia-ro -t squashfs -o loop mount -t overlay overlay -olowerdir=/mnt/gaia-ro,upperdir=/mnt/gaia-rw/upper,workdir=/mnt/gaia-rw/work /.root exec switch_root /.root "$init" "$@" If you are interested, I can send you my scripts to do all this, but maybe you already have a better solution for all the booting/root disk stuff in place. I've dropped the ball on this and am working on other things right now. One issue I came across in my earlier review was the problem of writable partitions from a CD/DVD. It just seems like a kludge. The old iso is not capable of being loaded on a thumb drive without some modifications and I haven't figured that out yet. I then thought how the CD/DVD paradigm is so last decade. I think it would be much easier to produce an iso that targets a thumb drive only. Users could then add packages as they see fit. Comments? -- Bruce -- http://lists.linuxfromscratch.org/listinfo/blfs-dev FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
Re: [blfs-dev] Thinking about a new LFS Live CD/iso
On 04/19/16 02:54, Bruce Dubbs wrote: Douglas R. Reno wrote: This will take me a while. I have not built a live-dd/iso before and I'm just researching what is needed now. I do think a hint would be appropriate right now, but if everything works out, we might want to add something to BLFS like the section on Firewalls or Certificates. As I've done a live/rescue CD based on LFS/BLS and Douglas asked me directly about my approach, I thought I'd share how I went about it, and why. I'm sure some stuff could be simplified and would of course be glad to hear about it. My goal was to create a rescue CD with everything needed on it, that looks like a regular LFS system, e.g. with a writable, ext4 root partition. To my knowledge, a kernel can - either mount a root directly using root=/dev/sd. - mount an initrd as temporary root using initrd=.. For directly mounting root read/write, there would have to be read/writable partition somewhere, which is not the case on a CD. That's why I went for the initrd approach. To get a read/writable root partition, I went for the combined approach of squashfs/overlayfs. both natively supported by the kernel. The initrd init will mount the squashfs ro and then overlay a tmpfs memory filesystem to create the rw root partition. Whithin the squashfs file, everything you want to use is contained, the initial ramdisk will only need the stuff to run the init script, mount the squashfs and the overlayfs, and not much else. So, the sequence of things is: 1. Put everything you want to be on your live CD (including important directories, static device files) into a directory, with the right permissions etc. The 2. Pack this directory into a squashfs filesystem 3. Create an initrd containing the squashfs and an /init script that will mount the squashfs and overlay it with a tmpfs 4. Put isolinux, a kernel, the initrd and a config onto a iso. 5. Test the iso in qemu 6. Burn it on a cd BLFS stuff you need to create the rescue disk - cpio, to create the initramfs - mkinitramfs, to create the initramfs, as in http://www.linuxfromscratch.org/blfs/view/svn/postlfs/initramfs.html - libisoburn to create the image Stuff outside BLFS you need: - syslinux 6.03, from http://www.syslinux.org, to create the boot image - squashfs 4.3 from http://squashfs.sourceforge.net/, to create the squashfs If there is interest, I will gladly write up a hint, detailing all the steps on a working example. Kind regards Tim -- http://lists.linuxfromscratch.org/listinfo/blfs-dev FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
Re: [blfs-dev] Thinking about a new LFS Live CD/iso
> From: Tim Tassonis <st...@decentral.ch> > Date: Wed, 25 May 2016 15:27:01 +0200 > Subject: Re: [blfs-dev] Thinking about a new LFS Live CD/iso > > On 04/18/16 22:24, Bruce Dubbs wrote: . . > - llvm, mdadm, good if used on a system where lvm/RAID is used ( - s/l// presumably.) -- -- http://lists.linuxfromscratch.org/listinfo/blfs-dev FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
Re: [blfs-dev] Thinking about a new LFS Live CD/iso
Hi Bruce On 04/18/16 22:24, Bruce Dubbs wrote: I've been thinking thinking about a new Live CD/Rescue CD based on LFS. It would be much less ambitious than the old one that included an X implementation. What I had in mind is a base LFS system with the following: dhcpcd wget ssh/ssl which links screen mc gptfdisk gpm LFS HTML LFS sources tarball What else? Other possibilities: unzip subversion git wireless-tools wpa-supplicant -- Bruce I have created such a disk, mainly as a rescue disk. I also added: - bind, the client parts for nslookup - net-tools, as I'm just more used to them - llvm, mdadm, good if used on a system where lvm/RAID is used - cpio - pciutils - parted In order to create the cd, I also needed: - libburn, libisoburn, libisofs - squashfs - syslinux/isolinux My approach was to create a cd with isofs that runs a kernel with an initramfs. The initramfs stuff is pretty identical to the blfs one. Also on the CD, there is a squashfs file, containing all the stuff you want on your live system. In the initramfs's init, I mount the squashfs combined with an overlayfs, to get a writable root partition, with the writable parts in a tmpfs. This looks like this: mknod /dev/loop0 b 7 0 mkdir /.root mkdir /mnt mkdir /mnt/gaia-ro mkdir /mnt/gaia-rw mount -t tmpfs tmpfs /mnt/gaia-rw mkdir /mnt/gaia-rw/work mkdir /mnt/gaia-rw/upper mkdir /mnt/gaia mount /gaiarule.sqf /mnt/gaia-ro -t squashfs -o loop mount -t overlay overlay -olowerdir=/mnt/gaia-ro,upperdir=/mnt/gaia-rw/upper,workdir=/mnt/gaia-rw/work /.root exec switch_root /.root "$init" "$@" If you are interested, I can send you my scripts to do all this, but maybe you already have a better solution for all the booting/root disk stuff in place. Kind regards Tim -- decentral.ch - IT Stuff Tim Tassonis Dennlerstasse 36 8047 Zürich st...@decentral.ch +41 79 229 36 17 -- http://lists.linuxfromscratch.org/listinfo/blfs-dev FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
Re: [blfs-dev] Thinking about a new LFS Live CD/iso
Douglas R. Reno wrote: On Mon, Apr 18, 2016 at 5:51 PM, Bruce Dubbswrote: Douglas R. Reno wrote: I have had that idea for a long time actually. I would add stuff like pciutils, usbutils, hdparm, sg3_utils, ntfs-3g, parted, etc. to make it a more complete testing/rescue platform Seems reasonable. [snip] I think that unzip, subversion, git, wireless-tools, and wpa-supplicant would be useful, Will the LiveCD need an initramfs to boot? No, but the kernel will be fairly large. It is not intended to support everything though. Just a typical x86_64 based system starting to a virtual screen. OK, that makes sense. If you decide to script the build, can you send me a copy of the files? I would like to make a systemd adaptation just to prove that it can be done (that would include the systemd book and sources, as well as the kernel options necessary for it and systemd itself... could be used for reading the journal of a failed system and recovering it). This will take me a while. I have not built a live-dd/iso before and I'm just researching what is needed now. I do think a hint would be appropriate right now, but if everything works out, we might want to add something to BLFS like the section on Firewalls or Certificates. -- Bruce -- http://lists.linuxfromscratch.org/listinfo/blfs-dev FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
Re: [blfs-dev] Thinking about a new LFS Live CD/iso
On Mon, Apr 18, 2016 at 3:24 PM, Bruce Dubbswrote: > I've been thinking thinking about a new Live CD/Rescue CD based on LFS. It > would be much less ambitious than the old one that included an X > implementation. > > What I had in mind is a base LFS system with the following: > > dhcpcd > wget > ssh/ssl > which > links > screen > mc > gptfdisk > gpm > LFS HTML > LFS sources tarball > > What else? Other possibilities: > unzip > subversion > git > wireless-tools > wpa-supplicant > > -- Bruce > > I have had that idea for a long time actually. I would add stuff like pciutils, usbutils, hdparm, sg3_utils, ntfs-3g, parted, etc. to make it a more complete testing/rescue platform (and the ntfs-3g comes from my personal experience, since I use it regularly because I have a copy of my sources on a USB External Hard Drive that I copy over when needed on a new system). The pciutils and usbutils could be used to aid the user in knowing what to enable in the kernel before building it. I think that unzip, subversion, git, wireless-tools, and wpa-supplicant would be useful, however I would also add a copy of the latest jhalfs snapshot into that as well. It wouldn't be a bad idea to add all of the other filesystem programs that we have into the book into the LiveCD as well, as those could help recover a broken filesystem. If anyone uses MD RAID or LVM, I can see adding those utilities to the LiveCD helping them rescue a system. If a person is trying to determine whether or not their system is running too hot, lm_sensors could help out there. smartmontools would be incredibly useful as well, seeing as it could allow a person to run a test on their hard drive and/or find out whether or not the SMART data is reporting that it is failing. Might want to add Sudo as well, seeing as jhalfs needs it. Another thing... were you going to use OpenSSL or GnuTLS for wget? If I remember correctly, we had some problems with OpenSSL and Wget, and that is why the book recommends GnuTLS. Will the LiveCD need an initramfs to boot? This is a great idea! Douglas R. Reno -- http://lists.linuxfromscratch.org/listinfo/blfs-dev FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
[blfs-dev] Thinking about a new LFS Live CD/iso
I've been thinking thinking about a new Live CD/Rescue CD based on LFS. It would be much less ambitious than the old one that included an X implementation. What I had in mind is a base LFS system with the following: dhcpcd wget ssh/ssl which links screen mc gptfdisk gpm LFS HTML LFS sources tarball What else? Other possibilities: unzip subversion git wireless-tools wpa-supplicant -- Bruce -- http://lists.linuxfromscratch.org/listinfo/blfs-dev FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page