The debootstrapDebian within Puppy project

A home for all kinds of Puppy related projects
Message
Author
wiak
Posts: 2040
Joined: Tue 11 Dec 2007, 05:12
Location: not Bulgaria

#21 Post by wiak »

You already know how such build log messages go: you get a list of everything being downloaded, extracted and installed:

Code: Select all

debootstrap --arch=i386 --variant=minbase stretch chroot http://ftp.us.debian.org/debian/
I: Retrieving InRelease 
I: Retrieving Release 
I: Retrieving Release.gpg 
I: Checking Release signature
I: Valid Release signature (key id 
etc etc etc

And, all going well, which it did..., ends with final message:

Code: Select all

I: Base system installed successfully.
If you get end error messages you should consult the log inside debootstrap folder of chroot and work out from that what went wrong. That's as much standard procedure I give you since you already know it and I'm too busy doing actual testing at the moment - run your own tests and provide success/failure results with Puppy distributions would be better contribution...

wiak

anikin
Posts: 994
Joined: Thu 10 May 2012, 06:16

#22 Post by anikin »

Can you copy/paste the output in *full* as an attachment?
No speeches, no comments, no ifs/buts - just an output from *your* terminal.

User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#23 Post by fredx181 »

Hi all,

Although I didn't test on a Puppy here's a tip:
Once you have set up debootstrap and installed some programs already (by e.g. using apt-get) you can make some scripts to run different applications
For example if synaptic is installed already, create script synaptic.sh and run from the same directory where the chroot directory is located:
(when synaptic has stopped running, exiting from chroot and the umount commands will be done automatically)

Code: Select all

#!/bin/bash
# synaptic.sh, run synaptic in chroot and exit

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

cat << EOF | chroot chroot
export LC_ALL=C

##### start doing stuff here #####
synaptic # run program, can be any, if installed in chroot
# do some more
##### end of doing stuff #####

EOF

umount chroot/tmp
umount chroot/proc
umount chroot/dev/pts
umount chroot/dev
umount chroot/sys

EDIT: Added mounting and (at the end) unmounting chroot/tmp to above example
Could be required, see next post from wiak

Fred
Last edited by fredx181 on Sun 06 Aug 2017, 10:34, edited 1 time in total.

wiak
Posts: 2040
Joined: Tue 11 Dec 2007, 05:12
Location: not Bulgaria

#24 Post by wiak »

@anikin: No. You already posted a stretch debootstrap log using minbase (which defines what the log shows as installed), so the successful log is the same as that one. Just read your own log. Also, I have moved on and working on other debootstrap attempts on different Pups so the previous logs are no longer available (but read the one you have).

@fred: Thanks for the tip Fred. I actually installed synaptics using apt-get install, but your script makes it easy to run indeed! :-)

I currently have Debian Jessie running under Puppy Linux 4.3.1, but having trouble with DISPLAY :0.0 not working with X apps I've installed in Jessie. There is no .Xauthority file in Pup 4.3.1 and even the dangerous xhost + doesn't do the trick. It's a bit odd - but its a long time since I played with X (used to mainly use ssh -X for that kind of thing). Anyway, main thing is Jessie does work under Puppy 4.3.1 - think kernel said was too old for stretch (but maybe I made an installation mistake - I'll try again with that sometime - doubt I'll bother puzzling out the X DISPLAY issue since have no plans to use Pup 4.3.1 anyway!).

AH.... I just solved the issue. I needed:

Code: Select all

mount --bind /tmp chroot/tmp
That shared the relevant X lock files and synaptics and leafpad in the Debian Jessie now display fine on the Puppy Linux 4.3.1 X display...

Note that I haven't managed to get Debian Jessie or Stretch to debootstrap build under Puppy Linux 4.3.1 (it hangs part way through so doensn't even get as far as generating an error log). I have tried a Stretch created in Slacko32 on Pup431 but trying to chroot into it said kernel too old...

Hope all these results are useful to someone and save them some many hours of trying. Any problems or successes you have, please let me know.

wiak
Attachments
debootstrapDebianWheezyUnderPuppyLinux431.png
Debian Wheezy running under Puppy Linux 4.3.1
(219.97 KiB) Downloaded 488 times
Last edited by wiak on Sun 06 Aug 2017, 10:33, edited 1 time in total.

anikin
Posts: 994
Joined: Thu 10 May 2012, 06:16

#25 Post by anikin »

wiak wrote:@anikin: No. You already posted a stretch debootstrap log using minbase (which defines what the log shows as installed), so the successful log is the same as that one. Just read your own log. Also, I have moved on and working on other debootstrap attempts on different Pups so the previous logs are no longer available (but read the one you have). . .
For the second straight day, you're continuing to dodge my request to post a build log . . . because, you do not have a *clean*, *error-free* log.

Here's the thing: debootstrap, with some caveats, will run from any Linux distro, including Puppy. This so called *project* is an embarrassment, a demonstration of utter ignorance, absurdity and trivialization of the concept of debootstrap.

wiak
Posts: 2040
Joined: Tue 11 Dec 2007, 05:12
Location: not Bulgaria

#26 Post by wiak »

anikin

All the displayed examples built error free, despite your apparent 'doubts'. There is no chroot/debootstrap/debootstrap.log if there are no errors in the build as far as I noticed (though since it was error free I didn't really care to look). I am not about to build yet another debootstrap Debian Stretch just to supply you with yet another error-free log.

Perhaps you are having a problem with a build under some Puppy version but don't like to admit it. The only issue I have had (documented in the first post) is with Racy and Puppy Linux 4.3.1 where in order to get a clean build I had to first remove /lib: from their LD_LIBRARY_PATH; I hope that makes sense to you and sorts out your own issues.

If you (or anyone else) has any trouble with your own Puppy-based debootstrap builds then you should reveal the errors you are getting and perhaps I can help you. Otherwise move on please.

If you were contributing useful scripts such as Fred does, that would be great. It could become a very useful project in that case despite your scorn. I do realise you have commented on debootstrap earlier - nothing new in itself as I've said - it has been around since at least 2006 if not earlier, but no-one that I can find on any posts on this forum has been showing it used under Puppy (with most seeming to think it needed dpkg). As I said, if you don't like the thread, for any reason, no-one is forcing your to read it or use any of the information in it - frankly, I would now rather you went away and worked on your own things...

wiak
Last edited by wiak on Wed 21 Aug 2019, 03:31, edited 2 times in total.

wiak
Posts: 2040
Joined: Tue 11 Dec 2007, 05:12
Location: not Bulgaria

#27 Post by wiak »

Please note the LD_LIBRARY_PATH debootstrap build issue I document in the first post (and indeed in the post immediately above this one).

Hope that helps someone or other... If you have the issue but don't know how to modify your LD_LIBRARY_PATH please let me know and I'll so my best to explain. But the issue doesn't happen with Slacko64 or current tiny core linux anyway.

wiak
Last edited by wiak on Sun 06 Aug 2017, 21:07, edited 1 time in total.

User avatar
peebee
Posts: 4370
Joined: Sun 21 Sep 2008, 12:31
Location: Worcestershire, UK
Contact:

#28 Post by peebee »

Hi wiak

Tried your runes on my Slackware Current based system after loading the pet....

Got a couple of warnings from step 3. debootstrap:

Code: Select all

W: Failure trying to run: chroot /mnt/sda4/debian-mklive-stretch/stretch/chroot dpkg --force-depends --install /var/cache/apt/archives/libc6_2.24-11+deb9u1_i386.deb
W: See /mnt/sda4/debian-mklive-stretch/stretch/chroot/debootstrap/debootstrap.log for details (possibly the package /var/cache/apt/archives/libc6_2.24-11+deb9u1_i386.deb is at fault)
and then at step 7. discovered that there was no apt-get in the system....

debootstrp.log with false .gz is attached....

Do I need devx loaded?

I note you say
Note that to get a clean build under Racy (or Puppy Linux 4.3.1 for that matter, you must first remove /lib from the LD_LIBRARY_PATH - no such complicated measure is needed for Slacko32, Slacko64 or tiny core linux).
but don't see the step to do this removal....

Thanks
peebee
Attachments
debootstrap.log.gz
(4.13 KiB) Downloaded 159 times
ImageLxPup = Puppy + LXDE
Main version used daily: LxPupSc; Assembler of UPups, ScPup & ScPup64, LxPup, LxPupSc & LxPupSc64

wiak
Posts: 2040
Joined: Tue 11 Dec 2007, 05:12
Location: not Bulgaria

#29 Post by wiak »

Hi Peebee,

EDIT: You don't need apt/dpkg at all on your Slackware system, that will be installed on the chroot Debian system and used thereafter automatically as things proceed.

Looking at your error log, it does appear you have the /lib in LD_LIBRARY_PATH issue. Could you tell me a few other things:

1. When you say you ran debootstrap on your Slackware Current system, what exactly do you mean. Is that a Slacko Pup or an actual Slackware? I certainly didn't have any issues on the Puppy Slacko64 ver 6.3.2 system I first used.

2. I presume you entered the debootstrap line in a terminal (with the chroot subdirectory just under that working directory? Also, I presume there were a couple of build error messages after debootstrap finished downloading and extracting what it could (something about libc6?). If so that would also confirm the issue on your system might be the /lib in LD_LIBRARY_PATH issue.

My advice is to wipe the chroot directory and start again. Assuming like in the steps I gave, which had stretch dir with a chroot dir inside that and you have cd into stretch and opened a terminal there for commands:

Just prior to running the debootstrap --arch=i386 --variant=minbase stretch chroot http://ftp.us.debian.org/debian/ command, do the following in your terminal:

Code: Select all

echo $LD_LIBRARY_PATH
from the output you will probably see /lib as one of the reported library path entries. You don't want that before running the debootstrap command. So in the terminal enter:

Code: Select all

export LD_LIBRARY_PATH=the_path_you_just_saw_reported_but_without_/lib:_included
Then enter the big debootstrap build command and hopefully all will now go well...

Hope that makes sense. It's hard for me to explain the mod to LD_LIBRARY_PATH but basically the /lib: is likely at the front of that reported PATH and you want the rest but not that bit!

Let me know how it goes!

wiak

wiak
Posts: 2040
Joined: Tue 11 Dec 2007, 05:12
Location: not Bulgaria

#30 Post by wiak »

Just for a change used debootstrap instructions of first post to make a Ubuntu Xenial Xerus 64-bit install on my Puppy Slacko64 ver 6.3.2 system.

The only difference to the first post steps is that for step 3 I used command:

Code: Select all

debootstrap --arch=amd64 --variant=minbase xenial chroot http://archive.ubuntu.com/ubuntu/
Once I chroot chroot into that, I did:

Code: Select all

apt-get update
apt-get install nano
cd /etc/apt
nano sources.list
nano being a commandline text editor.

/etc/apt/sources.list at that stage only contained the entry:

Code: Select all

deb http://archive.ubuntu.com/ubuntu xenial main
so I appended the following two other repositories to the end of that file:

Code: Select all

deb http://archive.ubuntu.com/ubuntu xenial universe
deb http://archive.ubuntu.com/ubuntu xenial multiverse
That's because I wanted to install 'synaptic' graphical package manager and that isn't in main repository any more (it's in 'universe').

So I then did:

Code: Select all

apt-get update && apt-get install synaptic
which, albeit big, installed nicely...

and finally, I started that running in the background with:

Code: Select all

synaptic &
and took the screenshot below. I don't know why I've bothered to include a log of the successful installation - only thing it shows really, apart from packages, is "I: Base system installed successfully." :-) Different if there had a been errors, then a build error log helps diagnose the issue of course... there are no errors...
Attachments
UbuntuXenialRunningUnderSlacko64.png
Ubuntu Xenial 64bit running under Puppy Slacko64
(96.96 KiB) Downloaded 338 times
Last edited by wiak on Sun 06 Aug 2017, 22:46, edited 3 times in total.

dancytron
Posts: 1519
Joined: Wed 18 Jul 2012, 19:20

#31 Post by dancytron »

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
Posts: 2040
Joined: Tue 11 Dec 2007, 05:12
Location: not Bulgaria

#32 Post by wiak »

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?
Correct on all counts dancytron.

wiak

wiak
Posts: 2040
Joined: Tue 11 Dec 2007, 05:12
Location: not Bulgaria

XSlackoSlim running Debian Stretch

#33 Post by wiak »

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
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.

dancytron
Posts: 1519
Joined: Wed 18 Jul 2012, 19:20

#34 Post by dancytron »

wiak wrote:
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?
Correct on all counts dancytron.

wiak
Very cool.

I'll have to think about a real life use.

User avatar
peebee
Posts: 4370
Joined: Sun 21 Sep 2008, 12:31
Location: Worcestershire, UK
Contact:

#35 Post by peebee »

wiak 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
Hi 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
then you can copy and paste them directly into the terminal....
ImageLxPup = Puppy + LXDE
Main version used daily: LxPupSc; Assembler of UPups, ScPup & ScPup64, LxPup, LxPupSc & LxPupSc64

User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#36 Post by fredx181 »

Hi peebee,
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....
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.
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

User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#37 Post by fredx181 »

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:

Code: Select all

NEW_LD_LIBRARY_PATH=$(echo $LD_LIBRARY_PATH | sed -e 's#:/lib##')
export LD_LIBRARY_PATH=$NEW_LD_LIBRARY_PATH
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:

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
Still may not cover all cases though...

Fred

wiak
Posts: 2040
Joined: Tue 11 Dec 2007, 05:12
Location: not Bulgaria

#38 Post by wiak »

fredx181 wrote: Btw, how did you find out excluding /lib does the trick, why /lib shouldn't be in the library path ?
Thanks for the code Fred (link to your post now in first post of thread).

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

wiak
Posts: 2040
Joined: Tue 11 Dec 2007, 05:12
Location: not Bulgaria

#39 Post by 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

wiak
Posts: 2040
Joined: Tue 11 Dec 2007, 05:12
Location: not Bulgaria

#40 Post by wiak »

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....
Solution here:

http://www.murga-linux.com/puppy/viewto ... 751#963751

wiak

Post Reply