The debootstrapDebian within Puppy project
XSlackoSlim running Debian Stretch
Final screenshot for now is of the 32-bit Debian Stretch install created using debootstrap on Puppy Slacko64 ver 6.3.2 being now run under XSlackoSlim.
Also shows Synaptic Debian Package Manager and Guvcview webcam control/viewer with these Debian Stretch apps appearing in windows on the XSlackoSlim X display. I also tried building a Debian Stretch on XSlackoSlim using debootstrap but the build crashed out (broken pipe) midway through - might have just been bad luck and didn't have time to try again so just used the Slacko64 Debian Stretch build.
EDIT: Tried building a 32-bit Debian Stretch using debootstrap under mistfire's XSlackoSlim again, and got a clean Build this time, so no problem. Like Puppy Racy, however, you have to temporarily remove /lib: from the LD_LIBRARY_PATH before running the debootstrap command. That workaround is described in more detail here:
http://murga-linux.com/puppy/viewtopic. ... 323#963323
wiak
Also shows Synaptic Debian Package Manager and Guvcview webcam control/viewer with these Debian Stretch apps appearing in windows on the XSlackoSlim X display. I also tried building a Debian Stretch on XSlackoSlim using debootstrap but the build crashed out (broken pipe) midway through - might have just been bad luck and didn't have time to try again so just used the Slacko64 Debian Stretch build.
EDIT: Tried building a 32-bit Debian Stretch using debootstrap under mistfire's XSlackoSlim again, and got a clean Build this time, so no problem. Like Puppy Racy, however, you have to temporarily remove /lib: from the LD_LIBRARY_PATH before running the debootstrap command. That workaround is described in more detail here:
http://murga-linux.com/puppy/viewtopic. ... 323#963323
wiak
- Attachments
-
- DebianStretchRunningUnderXSlackoSlim.png
- Debian Stretch running under XSlackoSlim
- (174.1 KiB) Downloaded 879 times
Last edited by wiak on Mon 07 Aug 2017, 03:44, edited 1 time in total.
Very cool.wiak wrote:Correct on all counts dancytron.dancytron wrote:So, to understand your screenshot, the desktop in the background is Puppy and Synaptic is running in a window?
So you didn't have to install a desktop like openbox in Ubuntu?
If I am right so far, does the mean that xorg is just in Puppy too?
wiak
I'll have to think about a real life use.
Hi wiakwiak wrote:Hi Peebee,
it does appear you have the /lib in LD_LIBRARY_PATH issue.
1. Is that a Slacko Pup or an actual Slackware?
Let me know how it goes!
wiak
My base system is LxPupSc which is a 32-bit woof-ce build and very similar to Slacko but built with Slackware Current components.
With /lib removed from LD_LIBRARY_PATH your runes ran to completion - many thanks.
I then tried to run Fred's mklive-stretch script on the resulting system - this also appeared to work - an iso was duly produced - but there are some oddities and the system does not boot....will have to seek Fred's advice on that....
Cheers
peebee
p.s. if you change the 2 code blocks in post #1 to:
Code: Select all
mount --bind /proc chroot/proc && mount --bind /dev chroot/dev && mount --bind /sys chroot/sys && mount -t devpts devpts chroot/dev/pts && cp /etc/resolv.conf chroot/etc/resolv.conf
umount chroot/proc && umount chroot/dev/pts && umount chroot/dev && umount chroot/sys
LxPup = Puppy + LXDE
Main version used daily: LxPupSc; Assembler of UPups, ScPup & ScPup64, LxPup, LxPupSc & LxPupSc64
Main version used daily: LxPupSc; Assembler of UPups, ScPup & ScPup64, LxPup, LxPupSc & LxPupSc64
Hi peebee,
See also here:
http://murga-linux.com/puppy/viewtopic. ... 466#963466
Besides debootstrap it requires mksquashfs and xorriso, isolinux (on Debian 'isolinux' is package, don't know about slackware) (for ISO creating)
Fred
Yes, one reason for failing anyway was that it could work only from a host OS with exactly the same kernel version that Stretch has by default, that I fixed now, so good chance it works on a Puppy also now.I then tried to run Fred's mklive-stretch script on the resulting system - this also appeared to work - an iso was duly produced - but there are some oddities and the system does not boot....will have to seek Fred's advice on that....
See also here:
http://murga-linux.com/puppy/viewtopic. ... 466#963466
Besides debootstrap it requires mksquashfs and xorriso, isolinux (on Debian 'isolinux' is package, don't know about slackware) (for ISO creating)
Fred
Hi wiak, all,
Here's easy way to exclude /lib from LD_LIBRARY_PATH
Just run this before running debootstrap build in same terminal session:
Btw, how did you find out excluding /lib does the trick, why /lib shouldn't be in the library path ?
Tested now on puppy X-Tahr and successful debootstrap build in chroot.
And... new mklive-stretch works fine also on X-Tahr (probably on most newer puppies, I guess)
Only the ISO creation failed because I didn't have xorriso installed.
EDIT: Above code for remove /lib doesn't work if /lib is at beginning of the path, so better:
Still may not cover all cases though...
Fred
Here's easy way to exclude /lib from LD_LIBRARY_PATH
Just run this before running debootstrap build in same terminal session:
Code: Select all
NEW_LD_LIBRARY_PATH=$(echo $LD_LIBRARY_PATH | sed -e 's#:/lib##')
export LD_LIBRARY_PATH=$NEW_LD_LIBRARY_PATH
Tested now on puppy X-Tahr and successful debootstrap build in chroot.
And... new mklive-stretch works fine also on X-Tahr (probably on most newer puppies, I guess)
Only the ISO creation failed because I didn't have xorriso installed.
EDIT: Above code for remove /lib doesn't work if /lib is at beginning of the path, so better:
Code: Select all
echo $LD_LIBRARY_PATH # check if it has /lib
if [ $(echo $LD_LIBRARY_PATH | grep "^/lib") ]; then
NEW_LD_LIBRARY_PATH=$(echo $LD_LIBRARY_PATH | sed -e 's#/lib:##')
export LD_LIBRARY_PATH=$NEW_LD_LIBRARY_PATH
elif [ $(echo $LD_LIBRARY_PATH | grep ":/lib") ]; then
NEW_LD_LIBRARY_PATH=$(echo $LD_LIBRARY_PATH | sed -e 's#:/lib##')
export LD_LIBRARY_PATH=$NEW_LD_LIBRARY_PATH
fi
echo $LD_LIBRARY_PATH # check if it is without /lib now
Fred
Thanks for the code Fred (link to your post now in first post of thread).fredx181 wrote: Btw, how did you find out excluding /lib does the trick, why /lib shouldn't be in the library path ?
As for /lib trick. I checked the debootstrap.log and it said something about couldn't change libc6 cos of /lib in path or something like that. So I just tried removing it from LD_LIBRARY_PATH, and to be honest, was shocked/surprised that did the trick.
EDIT: since you asked, I have since googled and found a reference (though as I said I basically just stumbled on solution myself without google for a change...):
http://www.linuxquestions.org/questions ... 175465295/
Poster Wocky mentions /lib issue it in above thread.
wiak
By the way, there is also:
arch-bootstrap, pacstrap, arch-chroot, and similar tools/methods for Arch Linux installs. I've also come across a archstrap (via google).
https://github.com/tokland/arch-bootstrap
https://wiki.archlinux.org/index.php/In ... ting_Linux
Or for creating several distributions types there is a Python program:
https://github.com/hartwork/image-bootstrap (also mentioned on the archlinux wiki link above).
wiak
arch-bootstrap, pacstrap, arch-chroot, and similar tools/methods for Arch Linux installs. I've also come across a archstrap (via google).
https://github.com/tokland/arch-bootstrap
https://wiki.archlinux.org/index.php/In ... ting_Linux
Or for creating several distributions types there is a Python program:
https://github.com/hartwork/image-bootstrap (also mentioned on the archlinux wiki link above).
wiak
Solution here:peebee wrote: My base system is LxPupSc which is a 32-bit woof-ce build and very similar to Slacko but built with Slackware Current components.
With /lib removed from LD_LIBRARY_PATH your runes ran to completion - many thanks.
I then tried to run Fred's mklive-stretch script on the resulting system - this also appeared to work - an iso was duly produced - but there are some oddities and the system does not boot....
http://www.murga-linux.com/puppy/viewto ... 751#963751
wiak
Just tried it on Slacko 6.3.2, ran into the /lib error issue. Removed /lib variable and ran the debootstrap and then put it back.
From the base Debian, I just installed x11-apps for a small quick test of xclock and xcalc in the chroot. Yep, that works. Neat!
I put the commands all into one script called enter-chroot inside the target directory so it would automatically clean itself up on exit:
Exited Slacko 6.3.2 and rebooted into Tahr 6.0.5 and did the enter-chroot, and the chroot worked right where I left off.
This reminds me of David Schneider's crouton for chroot of ChromeOS with Ubuntu. I had that a few years ago on an old Chromebook, but ended up getting rid of it.
Would be interesting to see if can get this chroot to look and work like that.
Edit: Didn't see that Fred had already made one which is more complete, changed slightly and updated.
From the base Debian, I just installed x11-apps for a small quick test of xclock and xcalc in the chroot. Yep, that works. Neat!
I put the commands all into one script called enter-chroot inside the target directory so it would automatically clean itself up on exit:
Code: Select all
#!/bin/bash
mount --bind /proc chroot/proc
mount --bind /tmp chroot/tmp
mount --bind /dev chroot/dev
mount --bind /sys chroot/sys
mount -t devpts devpts chroot/dev/pts
cp /etc/resolv.conf chroot/etc/resolv.conf
chroot chroot
export LC_ALL=C
umount chroot/tmp
umount chroot/proc
umount chroot/dev/pts
umount chroot/dev
umount chroot/sys
Exited Slacko 6.3.2 and rebooted into Tahr 6.0.5 and did the enter-chroot, and the chroot worked right where I left off.
This reminds me of David Schneider's crouton for chroot of ChromeOS with Ubuntu. I had that a few years ago on an old Chromebook, but ended up getting rid of it.
Would be interesting to see if can get this chroot to look and work like that.
Edit: Didn't see that Fred had already made one which is more complete, changed slightly and updated.
Last edited by jd7654 on Thu 10 Aug 2017, 18:59, edited 5 times in total.
New test of chroot with Quirky 8.3 frugal looks good.
Have Debian Stretch amd64 with Xfce4 desktop running inside (on top of) Quirky Xerus 8.3 JWM/Rox desktop. It works! Can run any Quirky app alongside Debian/Xfce app on same desktop.
Just so happens that one menu is on top and the other is on the bottom, so can use both. But Desktop JWM/Rox and drive icons are obscured.
Next step would be getting Xfce to run in a window.
Have Debian Stretch amd64 with Xfce4 desktop running inside (on top of) Quirky Xerus 8.3 JWM/Rox desktop. It works! Can run any Quirky app alongside Debian/Xfce app on same desktop.
Just so happens that one menu is on top and the other is on the bottom, so can use both. But Desktop JWM/Rox and drive icons are obscured.
Next step would be getting Xfce to run in a window.
- Attachments
-
- debian-chroot-in-quirky-800.jpg
- (71.01 KiB) Downloaded 569 times
Good and interesting example builds, jd7654, and crouton project link very informative too. I've linked to your start/stop debootstrapDebian system script in first post of this thread (at end of step 4: making the bind mounts). I like to keep this simple version of the setup (which your script contributes nicely to) but I have also now downloaded crouton with view towards maybe making a version for Puppy/Linux-in general or at least to get ideas from there.jd7654 wrote:New test of chroot with Quirky 8.3 frugal looks good.
Have Debian Stretch amd64 with Xfce4 desktop running inside (on top of) Quirky Xerus 8.3 JWM/Rox desktop. It works! Can run any Quirky app alongside Debian/Xfce app on same desktop.
Just so happens that one menu is on top and the other is on the bottom, so can use both. But Desktop JWM/Rox and drive icons are obscured.
Next step would be getting Xfce to run in a window.
Note that I'm not much of a programmer, though I can bash script reasonably. However, the crouton MAKEFILE is way beyond my level of understanding. That may be a good thing though, since Fred has demonstrated in his DebianDog-like Stretch build system that a simple bash build script is much more usable/modifiable by many Puppy forum members than any more complex system - I'd hope we can do something similar for simply running Linux variants under a Puppy chroot. Of course we can also use the likes of yad for simple GUI (and less likely: gtkdialog, which doesn't seem to be maintained much any longer). I certainly think it is much easier on actual linux systems than getting such to work on Chromium OS (hence so much work in crouton maybe).
Here again is the crouton github link jd7654 gave:
https://github.com/dnschneid/crouton
EDIT: Actually, looking at some of the crouton desktop-related build scripts, you might find some useful stuff in there too for your mklive build script Fred. For example, in crouton-master/targets/ folder.
wiak
- Attachments
-
- README.md.tar
- crouton README. Just remove the dummy tar.
- (14.26 KiB) Downloaded 139 times
Yeah, crouton was pretty cool. I guess thats the kind of stuff those Google employees create in their personal time.
I had a vague awareness of chroot, and had used it a few times to do manual Arch Linux install. But never really knew what it could do until I got a chromebook and installed crouton. Very slick. Main benefit is that you cannot easily install Linux on Chromebook with stock BIOS, but with crouton, you didn't really need to. You just use the chromebook for what it does best: Chrome, Gmail and Youtube, and then instantly flip over to Ubuntu chroot and have full apps suite available to you.
I had a vague awareness of chroot, and had used it a few times to do manual Arch Linux install. But never really knew what it could do until I got a chromebook and installed crouton. Very slick. Main benefit is that you cannot easily install Linux on Chromebook with stock BIOS, but with crouton, you didn't really need to. You just use the chromebook for what it does best: Chrome, Gmail and Youtube, and then instantly flip over to Ubuntu chroot and have full apps suite available to you.
Just informational:(I'm not really playing around with this anymore)
If simple chroot and run some commands and lite x-apps, chroot exited cleanly.
If launch startxfce4, many stuck processes and /dev,/proc won't unmount. Tried some other mount options but no clean fix found. Others are welcome to try.
If simple chroot and run some commands and lite x-apps, chroot exited cleanly.
If launch startxfce4, many stuck processes and /dev,/proc won't unmount. Tried some other mount options but no clean fix found. Others are welcome to try.
Code: Select all
# exit
umount: can't unmount /mnt/sda5/DebStretch/chroot/proc: Device or resource busy
umount: can't unmount /mnt/sda5/DebStretch/chroot/dev: Device or resource busy
# fuser -m chroot/dev
/mnt/sda5/DebStretch/chroot/dev: 408 1714 1726 1753 2154 2952 2974m 3144 3146 3164 3191 3292 3293 3306 3331 3333 3335 3337 3399 3401 3491 3494 3597 3600 3825 3831 3897 5189 5706 5894 5993 5994 8761 8762 8764 8803 8805 8818 8821 8844 8876 8882
# fuser -m chroot/proc
/mnt/sda5/DebStretch/chroot/proc: 2e 4e 5e 6e 7e 8e 9e 10e 11e 12e 13e 14e 15e 16e 17e 18e 19e 20e 21e 22e 23e 24e 25e 26e 27e 28e 29e 30e 31e 56e 57e 58e 59e 60e 61e 62e 63e 64e 65e 66e 67e 68e 69e 70e 71e 72e 73e 74e 75e 76e 77e 78e 79e 80e 81e 82e 83e 85e 86e 87e 88e 97e 100e 113e 114e 115e 120e 123e 188e 199e 221e 257e 274e 406e 1050e 1074e 1108e 1213e 1214e 1215e 1221e 2974 7313e 8326e 8327e 8433e 8818 8876
Hello jd7654!
Hello Wiak!
/chroot/proc: device is busy.
In some case useful info about processes that uses
the device is found by lsof or fuser.
/chroot/dev: device is busy.
In some case useful info about processes that uses
the device is found by lsof or fuser.
this Work for me.
umount -lf /proc
umount -lf /dev
From Will Haley Create a Custom Debian Live Environment.
umount -lf /proc
umount -lf /sys
umount -lf /dev/pts
umount -lf /dev
umount --help
-l Lazy unmount. Detach the filesystem from the filesystem hierarchy now,
and cleanup all references to the filesystem as soon as it is not busy anymore.
This option allows a "busy" filesystem to be unmounted. (Requires kernel 2.4.11 or later.)
Maybe this can be useful.
https://www.cyberciti.biz/tips/how-do-i ... ition.html
apt-get install lsof
If your device name is /dev/sdx, enter the following command as root user:
lsof | grep '/dev/sdx'
Output:
vi 4453 vivek 3u BLK 8,1 8167 /dev/sdx
Above output tells that user vivek has a vi process running that is using /dev/sdx.
All you have to do is stop vi process and run umount again.
As soon as that program terminates its task,
the device will no longer be busy and you can unmount it with the following command:
umount /dev/sdx
Andresc2
Hello Wiak!
/chroot/proc: device is busy.
In some case useful info about processes that uses
the device is found by lsof or fuser.
/chroot/dev: device is busy.
In some case useful info about processes that uses
the device is found by lsof or fuser.
this Work for me.
umount -lf /proc
umount -lf /dev
From Will Haley Create a Custom Debian Live Environment.
umount -lf /proc
umount -lf /sys
umount -lf /dev/pts
umount -lf /dev
umount --help
-l Lazy unmount. Detach the filesystem from the filesystem hierarchy now,
and cleanup all references to the filesystem as soon as it is not busy anymore.
This option allows a "busy" filesystem to be unmounted. (Requires kernel 2.4.11 or later.)
Maybe this can be useful.
https://www.cyberciti.biz/tips/how-do-i ... ition.html
apt-get install lsof
If your device name is /dev/sdx, enter the following command as root user:
lsof | grep '/dev/sdx'
Output:
vi 4453 vivek 3u BLK 8,1 8167 /dev/sdx
Above output tells that user vivek has a vi process running that is using /dev/sdx.
All you have to do is stop vi process and run umount again.
As soon as that program terminates its task,
the device will no longer be busy and you can unmount it with the following command:
umount /dev/sdx
Andresc2
wiak on 10Aug wrote:Or maybe use:
From umount man page:Code: Select all
umount -l fs_to_umount
or forced umount:-l
Lazy unmount. Detach the filesystem from the filesystem hierarchy now, and cleanup all references to the filesystem as soon as it is not busy anymore. (Requires kernel 2.4.11 or later.)
umount -f ...
Also: https://serverfault.com/questions/17284 ... ead-chroot-f
Force unmount (in case of an unreachable NFS system). (Requires kernel 2.1.116 or later.)
wiak
But maybe getting a bit too off-topic. The export -f chroot_in situation of more interest.
Yes, I wondered if that would work for you. I was hoping you would post back your results following my post above on the other (Fred mklive-stretch) thread.AndresC2 wrote:Hello jd7654!
Hello Wiak!
/chroot/proc: device is busy.
In some case useful info about processes that uses
the device is found by lsof or fuser.
/chroot/dev: device is busy.
In some case useful info about processes that uses
the device is found by lsof or fuser.
this Work for me.
umount -lf /proc
umount -lf /dev
From Will Haley Create a Custom Debian Live Environment.
umount -lf /proc
umount -lf /sys
umount -lf /dev/pts
umount -lf /dev
Thanks to anikin for first mentioning Will Haley on here. DebianDog's should have listened about debootstrap earlier.
Anyway, it has all given a new enthusiastic life to Puppy forum at the moment with lots of prospects to look forward to. I hope Puppy developers can somehow use some of this work in new Puppy developments somehow; maybe include debootstrap additions to woof-ce in new Puppy build recipes? - especially useful in non-debian/ubuntu-Puppy builds maybe - or perhaps take a look at the archstrap possibilities also that I mentioned earlier:
I am particularly happy to see rcrsn51 being so heavily involved (despite a few doubts I had earlier...). His peasywifi works great for me in everything I try it on and many of his peasy apps are just perfect for incorporating into small linux distributions.wiak wrote:By the way, there is also:
arch-bootstrap, pacstrap, arch-chroot, and similar tools/methods for Arch Linux installs. I've also come across a archstrap (via google).
https://github.com/tokland/arch-bootstrap
https://wiki.archlinux.org/index.php/In ... ting_Linux
Or for creating several distributions types there is a Python program:
https://github.com/hartwork/image-bootstrap (also mentioned on the archlinux wiki link above).
wiak
My only minor issue with current mklive-stretch (which I mentioned much earlier on in the project) is that the script could do with being more modularised in my opinion - rcrsn51 seems particularly skilled at that kind of thing but maybe too busy to make suggestions about that. My point is that the script is becoming quite long, so more difficult to maintain if not broken down into function-sized chunks (that could be more easily chopped and changed). If that were done it would be easier to have the same script working as a GUI or at the commandline. But this is no major complaint - Fred's script is easy to read still (so very informative) and does the job well.
Anyway, that comment is for that other thread so I should really post it over there, but don't want to interrupt progress there where Fred is already working on incorporating so many suggested changes.
For this particular thread I'm thinking of creating a very small script to increase the convenience of starting up a debootstrapDebian within Puppy in such a way that the Debian system apps are more integrated with the provided Puppy ones - but I don't see that possibility as ultra-important or urgent for implementation or if it would have much use in practice...
wiak
Last edited by wiak on Wed 21 Aug 2019, 02:52, edited 1 time in total.
using first post instructions to chroot into Fred's build
In case anyone doesn't realise it, the intermediate stretch/chroot system built via the scripts provided in Fred's "Create Debian 9 (Stretch) minimal ISO" thread can itself be immediately chroot into by opening a terminal at the stretch directory and entering the commands (on Puppy or any Linux system really):
When you are finished you can just type exit in your debian 9 terminal and then umount the binds as usual with:
What you are accessing is not the final iso or even the final /live folder (which is for frugal installs) but rather the underlying chroot/linux_filesystem that was used in the build (but contains all the applications installed). Since in this case you are running that system from your host Linux, you don't get the window manager you would by booting into the /live frugal or iso version. Rather, you are getting the X display, window manager, and kernel/modules provided by your host Linux. You can still however run the underlying apps via a terminal in the usual debootstrapDebian manner (can't run a 64-bit build on a 32-bit host though...). For example, in a terminal in the chroot debian:
In practice, once Fred's script has created the actual "live" folder and the iso, you no longer need that underlying stretch/chroot system at all anymore for booting purposes, but as long as it is there you can use it!
As far as booting Fred's isodata/live as a frugal install, you can as dancytron suggested in that Debian 9 (Stretch) thread of Fred immediately boot via grub4dos with a menu.lst such as (dancytron's example):
(just change the partition details to suit where you have it)
wiak
Code: Select all
mount --bind /proc chroot/proc && mount --bind /dev chroot/dev && mount --bind /sys chroot/sys && mount -t devpts devpts chroot/dev/pts && cp /etc/resolv.conf chroot/etc/resolv.conf
chroot chroot
Code: Select all
umount chroot/proc && umount chroot/dev/pts && umount chroot/dev && umount chroot/sys
Code: Select all
apt-get update
synaptic &
As far as booting Fred's isodata/live as a frugal install, you can as dancytron suggested in that Debian 9 (Stretch) thread of Fred immediately boot via grub4dos with a menu.lst such as (dancytron's example):
Code: Select all
title stretch/isodata (sda2) noauto from=/stretch/isodata/ changes=EXIT:/stretch/isodata/
root (hd0,1)
kernel (hd0,1)/stretch/isodata/live/vmlinuz1 noauto from=/stretch/isodata/ changes=EXIT:/stretch/isodata/
initrd (hd0,1)/stretch/isodata/live/initrd1.xz
wiak
build a real puppy so?
did some one already build a REAL Puppy with the methode of the debootstrapDebian within Puppy project?
if yes
can the next step, using apt-build, do it from sources, exactly for the own processor and other own hardware and locales, be done?
if yes
can the next step, using apt-build, do it from sources, exactly for the own processor and other own hardware and locales, be done?
No great skill. I just chopped out the YAD stuff in lines 24-76 and set the nine variables like BASE_INSTALL to their corresponding strings.wiak wrote: rcrsn51 seems particularly skilled at that kind of thing
I then customized those strings for my setup.
Everything from the original line 78 on is unchanged.