Building Blocks

Here is a place for your projects which are not officially supported by the Porteus Team. For example: your own kernel patched with extra features; desktops not included in the standard ISO like Gnome; base modules that are different than the standard ISO, etc...
Bogomips
Full of knowledge
Full of knowledge
Posts: 2563
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

Re: Building Blocks

Post#46 by Bogomips » 27 Jan 2016, 00:54

Jack wrote:If I new the minimum amount of packages that all I would use but I don't know for sure.
IMHO this is something about what this exercise is all about. Aso have no problem with people standing by the wayside watching us going through the hoops, but a timely nudlge in the right direction would be most appreciated, sort of the way brokenman seems to be doing.
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

User avatar
brokenman
Site Admin
Site Admin
Posts: 5542
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: Building Blocks

Post#47 by brokenman » 27 Jan 2016, 01:29

To get a bootable system. I booted from porteus-v3.1 and used the scripts I supplied to download slackware-current packages for 001 and 002. Some extras for slackware-14.2 are also required (especially eudev,pulseaudio)
I then updated to kernel 4.4 LTS (don't forget aufs patch and add overlayfs into kernel and not a module if you want to use it to boot)

ftp://ftp.slackware.com/pub/slackware/s ... _HINTS.TXT <--- read this well

For each module (001 002)
I unpacked these packages into a folder.
Then I added the custom files in my tree.
Then I stripped it.
Then I made a module in the ISO
Then I booted into text mode (using virtualbox) and began troubleshooting <--- this can be long and laborious
Once I got a bootable text mode I could move on to 003-desktop

Once you get it all up and running then look at tweaking things like linuxrc. If you don't do it in this way it may be difficult to troubleshoot exactly where control was lost. Bogomips I am not sure if you are building something along the lines of slackwarelive by alienbob or a porteus system but I will try to offer advice where and when I can.
How do i become super user?
Wear your underpants on the outside and put on a cape.

Bogomips
Full of knowledge
Full of knowledge
Posts: 2563
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

Re: Building Blocks

Post#48 by Bogomips » 27 Jan 2016, 22:45

brokenman wrote: Bogomips I am not sure if you are building something along the lines of slackwarelive by alienbob or a porteus system but I will try to offer advice where and when I can.
Playing it by ear at the moment, but looking just a little bit ahead, looking to see if 0020-slackware_min-current-x86_64.sxz could serve as a minimal 001 Core, and at least land one in text mode. The updated 001 list you supplied has 161 packages, alienbob's sxz has 113 packages, of these 69 are common. There is an overlap of 44 packages on the side of AB, and 92 on the Porteus side.

Alienbob overlap packages:

Code: Select all

binutils        bison           ca-certificates cryptsetup      dev86
devs            elvis           flex            gc              gcc
ghostscript     glibc           gnupg           gnupg2          gnutls
gpgme           guile           kernel-firmware kernel-generic  kernel-headers
kernel-modules  libassuan       libgcrypt       libgpg-error    libksba
libmpc          lilo            links           make            man-pages
mkinitrd        mtr             nano            openldap-client polkit
pth             python          quota           sharutils       slackpkg
sudo            syslinux        terminus-font   util-linux
Porteus Updated List overlap packages:

Code: Select all

NetworkManager          acpid                   alsa-lib
alsa-utils              bc                      bridge-utils
cdrtools                cgmanager               cifs-utils
curl                    dbus                    dmapi
dnsmasq                 dosfstools              dvd+rw-tools
eject                   elfutils                ethtool
fuse                    gdbm                    gettext
glibc-solibs            gpm                     hdparm
httpfs2                 hwdata                  ifenslave
ipw2100-fw              ipw2200-fw              laptop-mode-tools
libcap                  libffi                  libidn
libmnl                  libndp                  libnetfilter_conntrack
libnfnetlink            libnftnl                libnih
libnl3                  libpcap                 libraw1394
libssh2                 libusb                  libusb-compat
lm_sensors              lsof                    lynx
lzip                    lzo                     newt
nfs-utils               ntfs-3g                 openvpn
p7zip                   patch                   pcre
popt                    portmap                 powertop
ppp                     pptp                    readline
reiserfsprogs           rfkill                  rp-pppoe
rpm                     rpm2tgz                 sdparm
sg3_utils               smartmontools           sqlite
squashfs-tools          sshfs-fuse              sysfsutils
sysvinit-functions      telnet                  tofrodos
traceroute              unrar                   usb_modeswitch
usbmuxd                 usm                     util
webfs                   wgetpaste               wireless-tools
wpa_supplicant          xfsdump                 xfsprogs
zd1211-firmware         zlib
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

User avatar
brokenman
Site Admin
Site Admin
Posts: 5542
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: Building Blocks

Post#49 by brokenman » 28 Jan 2016, 01:10

Ok. 0020-slackware_min-current-x86_64.sxz may do as a base. There are also quite a few non-essential packages in the porteus 001. Here are some that stood out at a glance.

Code: Select all

httpfs2
nfs-utils
ntfs-3g
p7zip
patch
smartmontools
sshfs-fuse
tofrodos
usm
webfs
wgetpaste
cifs-utils
gettext
laptop-mode-tools
powertop
How do i become super user?
Wear your underpants on the outside and put on a cape.

Bogomips
Full of knowledge
Full of knowledge
Posts: 2563
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

Re: Building Blocks

Post#50 by Bogomips » 29 Jan 2016, 00:24

brokenman, in trying to merge in the overlay code from your linuxrc, have come across a couple of inconsistencies. So I take it this is just a sample of the coding for overlays and not a working linuxrc:

Code: Select all

guest@porteus:~$ grep -n merge linuxrcov
108:mount -no bind /merge/lib/modules /lib/modules 2>/dev/null
122:mount -t overlay overlay -o lowerdir=$ARGS,upperdir=/memory/changes,workdir=/memory/work /merge
123:#mount -t overlay overlay -o lowerdir=$ARGS,upperdir=/memory/changes,workdir=/memory/work /merge
133:cp -af /dev/console /merge/dev
142:cp -af $livedbg /merge/var/log/porteus-livedbg
147:      mkdir -p /merge/mnt/$x
152:    grep /mnt/ /etc/fstab >> /merge/etc/mtab
153:    for x in `grep /mnt/ /etc/fstab | cut -d/ -f3`; do mkdir -p /merge/mnt/$x; mount -n --move /mnt/$x /merge/mnt/$x; rmdir /mnt/$x; done
156:cp -f /etc/fstab /merge/etc 2>/dev/null
163:mkdir /merge/mnt/live
165:    pivot_root /merge  /merge/mnt/live
No 'merge' directory, so I assume in performing the strip edit, the mkdir was deleted. The next point is the bind on #108, as it looks like it would be lost when the overlay is mounted at #122.

Code: Select all

 80:  mount -o bind /opt/000-kernel/usr/lib/modules /usr/lib/modules 2>/dev/null
# Populate aufs with modules:
 96:  umount /lib/modules /opt/000-kernel 2>/dev/null
On line #80 the mount bind seems to be inconsistent with line #96, as /lib/modules does not look like a mount point.
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

User avatar
brokenman
Site Admin
Site Admin
Posts: 5542
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: Building Blocks

Post#51 by brokenman » 29 Jan 2016, 01:28

Very experimental, but it is a booting system for me. Keep in mind I was using Nemesis as a base in which lib is a symlink to /usr/lib. I will PM you with an example of a working ISO so things make more sense to you.
How do i become super user?
Wear your underpants on the outside and put on a cape.

Bogomips
Full of knowledge
Full of knowledge
Posts: 2563
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

Re: Building Blocks

Post#52 by Bogomips » 01 Feb 2016, 00:27

Merged into linuxrc overlayfs in Porteus format from brokenman's script, using Alien Bob's live script overlayfs section as tutorial. Landed on darkstar in Init 3. :Yahoo!: So far, I know noauto isn't working. Sorted out from iso to work.

Porteus oriented minimal Slackware live system:

Code: Select all

Sun Jan 31 15:11:49  2016

cat /proc/cmdline
[sgnfile=ptest.sgn] base_only noauto from=/dev/sda10/tmp/iso/abSlak.iso [debug]

Filesystem      Size  Used Avail Use% Mounted on
overlay         435M  6.6M  428M   2% /

ls /var/log
btmp                    cron                    debug
dmesg                   faillog                 lastlog
maillog                 messages                packages/
porteus-livedbg         removed_packages/       removed_scripts/
scripts/                secure                  setup/
spooler                 syslog                  wtmp

ls /mnt/live/memory/images/
000-kernel/
001-core/
test/

ls /mnt/live/memory/images/test/
ls -ld /mnt/live/memory/images/test/
drwxr-xr-x 2 root root 40 Jan 31 14:00 /mnt/live/memory/images/test//

ls /mnt/live/memory/images/000-kernel/
lib/

ls /mnt/live/memory/images/001-core/
SLACKWARELIVE   bin/            dev/            etc/            home/
lib/            lib64/          localtime@      media/          mnt/
opt/            proc/           root/           run/            sbin/
srv/            sys/            tmp/            usr/            var/

mount
aufs on / type aufs (rw)
proc on /proc type proc (rw)
/dev/sda1 on /mnt/sda1 type reiserfs (rw,noatime,nodiratime)
...
/dev/sda9 on /mnt/sda9 type ext2 (rw,noatime,nodiratime)
sysfs on /sys type sysfs (rw)
/dev/sda3 on /root/vf3 type vfat (rw)
/dev/sda8 on /root/vf8 type vfat (rw)

free -m
              total        used        free      shared  buff/cache   available
Mem:            868          14         656          12         197         815
Swap:           644           0         644

Slacklive(on entry x% ram):
Filesystem      Size  Used Avail Use% Mounted on
overlay         435M  6.6M  428M   2% /

Porteus(on entry 30% ram):
Filesystem      Size  Used Avail Use% Mounted on
aufs            265M  6.6M  258M   3% /
porteus-livedbg:

Code: Select all

# Recognized devices:
...

# Booting device:
/mnt/sda9

# Porteus data found in:
/mnt/sda9/porteus

# Changes are stored in:
memory

# Non standard /rootcopy dir:
none

# Modules activated during boot time:
/mnt/sda9/porteus/base/000-kernel.xzm
/mnt/sda9/porteus/base/001-core.xzm
Next need to check if rootcopy is functioning. Not sure how it would go if try replacing all of /etc with Porteus, or just the scripts section. :unknown:

guest@porteus:~$ md5sum abSlak.iso
f77f31f530321f43d9d163e7ecbc10c1 abSlak.iso
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

User avatar
brokenman
Site Admin
Site Admin
Posts: 5542
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: Building Blocks

Post#53 by brokenman » 01 Feb 2016, 01:27

Landed on darkstar in Init 3.
It's a nice feeling when that happens. A little celebratory dance follows. Congrats.
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
francois
Contributor
Contributor
Posts: 5067
Joined: 28 Dec 2010, 14:25
Distribution: kde xfce porteus manjaro kubun
Location: Enfin l'été, le changement climatique attendu: le soleil.

Re: Building Blocks

Post#54 by francois » 01 Feb 2016, 04:31

Congratulations bogomips. :D
Voltaire: Le mieux est l'ennemi du bien.

Jack
Contributor
Contributor
Posts: 1172
Joined: 09 Aug 2013, 14:25
Distribution: Porteus 3.2.rc5 Mate 64 bit
Location: Marysville, OHIO USA

Re: Building Blocks

Post#55 by Jack » 02 Feb 2016, 23:30

@Bogomips

I had to download it 2 times cause the first copy did not pass the md5sum. I just put it on a thumb drive. After I boot it I seen the first screen then I seen this.

Code: Select all

Loading vmlinuz..........
could not find ramdisk image initrd.xz
boot:
I think it was that and did try and remember.

Did you build 000 and 001? Then I use xzm2dir on 001-core and I try to look at 001-core for package list but you must have remove it.

I'm going to look at all your post and do what you just did. And try it my self.

Good job and are you to put more updates, so they can be download and tested?
I just like Slackware because I think it teach you about Linux to build packages where Ubuntu is like Windows you just install programs you want.

beny
Full of knowledge
Full of knowledge
Posts: 730
Joined: 02 Jan 2011, 11:33
Location: italy

Re: Building Blocks

Post#56 by beny » 03 Feb 2016, 00:00

hi bogomips no initrd.xz in the iso but initrd.img so i thing the porteus.conf not match the boot entry,you have to try to convert it.
find | cpio -H newc -o | xz --check=crc32 --x86 --lzma2 > ../initrd.xz
21548 blocchi
the initrd.xz is empty 32 byte but the initrd.gz is 4.7mb you can modify the part of xz and put on gz compression,i am on arch but step to do initrd i think are the same
wait process work i have the initrd.xz good for...try

Bogomips
Full of knowledge
Full of knowledge
Posts: 2563
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

Re: Building Blocks

Post#57 by Bogomips » 03 Feb 2016, 01:29

@ Jack
Good to see you testing. Think I know what the problem is. :wink: Will get back to you.
brokenman wrote:There are also quite a few non-essential packages in the porteus 001. Here are some that stood out at a glance.

Code: Select all

httpfs2
nfs-utils
ntfs-3g
p7zip
patch
smartmontools
sshfs-fuse
tofrodos
usm
webfs
wgetpaste
cifs-utils
gettext
laptop-mode-tools
powertop
Unfortunately usm complained about gettext not being present. Although satisfied usm with gettext, and wget functional, still usm seems to get frozen at the download stage:

Code: Select all

usm -u alien
 Starting alien database update 
Downloading: vercheck.txt  DONE
Downloading: CHECKSUMS.md5.gz -->

Progress so Far
Following initial euphoria, found had no network :( Looked at rc's in /etc, also at the .d's for any sign of networking. Came up empty. Also noticed lacking init.d. Could not immediately work out how to get networking going, so took leap of faith (not so hazardous on a live system):

Code: Select all

guest@porteus:~$ sudo mount Porteus-XFCE-v3.1-x86_64.iso z
mount: block device /home/guest/Porteus-XFCE-v3.1-x86_64.iso is write-protected, mounting read-only
guest@porteus:~$ sudo mount z/porteus/base/001-core.xzm x
guest@porteus:~$ d=$(echo x/etc/*.d)
guest@porteus:~$ echo "$d"
x/etc/cron.d x/etc/dnsmasq.d x/etc/init.d x/etc/logrotate.d x/etc/modprobe.d x/etc/profile.d x/etc/rc.d x/etc/rc0.d x/etc/rc1.d x/etc/rc2.d x/etc/rc3.d x/etc/rc4.d x/etc/rc5.d x/etc/rc6.d x/etc/rcS.d x/etc/sensors.d x/etc/usb_modeswitch.d
guest@porteus:~$ sudo mkdir /mnt/sda9/porteus/rootcopy/etc
guest@porteus:~$ sudo cp -a $d /mnt/sda9/porteus/rootcopy/etc
guest@porteus:~$ sudo umount x
guest@porteus:~$ sudo umount z
Hope symbolic links on rc's did not get clobbered in the process. Anyway now have network and DNS. Tested with wget.

Another interesting thing, was the amount of free space prior to, and after Porteus copy over :)

Code: Select all

Prior to Porteus:
Filesystem      Size  Used Avail Use% Mounted on
overlay         435M  6.6M  428M   2% /

After Porteus copy over:
Filesystem      Size  Used Avail Use% Mounted on
overlay         435M  1.5M  433M   1% /
@beny

Thanks for the info. It's time for the bedbugs to bite, so anyone know how to help Jack get syslinux to load an initrd.img, which is a gz? Otherwise will have to do new iso with porteus.conf converted as beny has pointed out. (myself working with Grub Legacy, so not so au fait with syslinux)
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

Jack
Contributor
Contributor
Posts: 1172
Joined: 09 Aug 2013, 14:25
Distribution: Porteus 3.2.rc5 Mate 64 bit
Location: Marysville, OHIO USA

Re: Building Blocks

Post#58 by Jack » 03 Feb 2016, 02:10

@ Jack
Good to see you testing. Think I know what the problem is. :wink: Will get back to you.
I will test anything you or anyone else will upload. I do like to try something new as long it fit on a 4gb thumb drive.

I have a working copy of Nemesis 3.5 LXDE which I have update and added some other program. I'm working on HP printer and scanner support only for it, but not sure what packages I need. Brokenman has done a great job with it.
I just like Slackware because I think it teach you about Linux to build packages where Ubuntu is like Windows you just install programs you want.

Bogomips
Full of knowledge
Full of knowledge
Posts: 2563
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

Re: Building Blocks

Post#59 by Bogomips » 03 Feb 2016, 13:42

Jack wrote:I do like to try something new as long it fit on a 4gb thumb drive.
Well, here's something new for you to try out. :wink: As experienced trouble with download, no need to do another one. Just follow the following steps:
  1. Rename the iso you downloaded to abs.iso
  2. Using Iso File Editor (Apps > Multimedia if you haven't used it before) open abs.iso
  3. Click open directory boot/syslinux
  4. Select porteus.cfg and click Extract. The file will be visible in the top half of the window.
  5. Using a text editor replace every .xz in the file with .img
  6. Replacing the File
    1. In lower window select porteus.cfg if not already selected.
    2. Click Remove
    3. In top window select porteus.cfg and click Add.
  7. Save iso as abSlak.iso
  8. Check it out by burning to CD if you can, which I've done and tested:
    1. At the menu select Text Mode
    2. Log in as root
    3. No password required. Just hit enter
    4. Be very careful. The whole computer is exposed :evil:
    5. Explore with Midnight Commander: mc
    6. Finish with Reboot
  9. If you make a mistake doing the iso edit, just close and start again, after deleting the extracted porteus.cfg file
  10. Enjoy!
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

Jack
Contributor
Contributor
Posts: 1172
Joined: 09 Aug 2013, 14:25
Distribution: Porteus 3.2.rc5 Mate 64 bit
Location: Marysville, OHIO USA

Re: Building Blocks

Post#60 by Jack » 03 Feb 2016, 14:52

Well I did what you told me to do. Now at the "starting init script" screen it tell me "Porteus path not found" and stop at that point and then reboot.
I just like Slackware because I think it teach you about Linux to build packages where Ubuntu is like Windows you just install programs you want.

Post Reply