The debootstrapDebian within Puppy project

A home for all kinds of Puppy related projects
Message
Author
AndresC2
Posts: 76
Joined: Sun 09 Jul 2017, 02:12

#46 Post by AndresC2 »

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

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

#47 Post by wiak »

wiak on 10Aug wrote:Or maybe use:

Code: Select all

umount -l fs_to_umount
From umount man page:
-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.)
or forced umount:

umount -f ...
-f
Force unmount (in case of an unreachable NFS system). (Requires kernel 2.1.116 or later.)
Also: https://serverfault.com/questions/17284 ... ead-chroot

wiak

But maybe getting a bit too off-topic. The export -f chroot_in situation of more interest.
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
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.

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

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.

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

using first post instructions to chroot into Fred's build

#48 Post by wiak »

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):

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
When you are finished you can just type exit in your debian 9 terminal and then umount the binds as usual with:

Code: Select all

umount chroot/proc && umount chroot/dev/pts && umount chroot/dev && umount chroot/sys
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:

Code: Select all

apt-get update
synaptic &
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):

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
(just change the partition details to suit where you have it)

wiak

oui

build a real puppy so?

#49 Post by oui »

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?

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#50 Post by rcrsn51 »

wiak wrote: rcrsn51 seems particularly skilled at that kind of thing
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.

I then customized those strings for my setup.

Everything from the original line 78 on is unchanged.

User avatar
mikeslr
Posts: 3890
Joined: Mon 16 Jun 2008, 21:20
Location: 500 seconds from Sol

#51 Post by mikeslr »

Skill, my dear rcrsn51, is what happens when you make something others find difficult seem easy.

So, I'd modify wiak's complement to read skilled and modest. :)

mikesLr


p.s. or perhaps cleverly devious in setting a trap for the unwary. :lol:

oui

#52 Post by oui »

Hm

I am sorry, but I am to come back to my question:

As Woof seems to be a real GREAT TERROR else for talented user like Musher (he is over that really natural English speaker, other not always, the most probably not!) or Rainer (RSH)

(probably because nobody consider with gravity the Puppy Wiki or feed it with really hints and knowledge, it is more somewhat like daily news as only the creator works on it)

Puppy has absolutely no POPULAR BASE AT ALL!

As Barry did leave Puppy for his Quirky's, Warry's, one-block kernel's etc. it was ok.

Now, years after that, the puppyists have anxiety today to try to build puppy and contribute!

An half hand of real contributors participates over the head of the other all. People like Musher and Rainer (RSH) (as well as the great quantity of Puppyists) did finish renouncing!

What is that for a community?

Is this community not able any more to reveal exact and methodical (well maintained wiki), to document, how Puppy is to build ...

... from sources?

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

chroot test a new woof-CE distribution build

#53 Post by wiak »

The following information may be of interest to those who have been trying out woof-CE, following the 'woof-CE needs you' thread:

http://www.murga-linux.com/puppy/viewtopic.php?t=101174

or experimenting with my 'makepup' single script to build a woof-CE Puppy system:

http://www.murga-linux.com/puppy/viewtopic.php?t=111389

NOTE: You can simply cut and paste the following lines into a terminal to try the technique described out:

You can test out some of the operation of your new woof-out_*/sandbox3/build distribution, from the host system you just built it on, by chroot into it and run some of the applications to test if working and generally inspect your new system. Note that running apps within your new build do not use your new build X or desktop but instead pops up windows in the X server/desktop of your host build system. Note also that you cannot chroot into a 64bit system from a 32bit host.

To do the above, first, cd into woof-out_* and then:

Code: Select all

cd sandbox3
Then enter in terminal:

Code: Select all

mkdir rootfs-complete/sys
Then enter in terminal:

Code: Select all

mount --bind /proc rootfs-complete/proc && mount --bind /dev rootfs-complete/dev && mount --bind /sys rootfs-complete/sys && mount -t devpts devpts rootfs-complete/dev/pts && cp /etc/resolv.conf rootfs-complete/etc/resolv.conf
Then enter in terminal:

Code: Select all

chroot rootfs-complete
That will take you into your now running rootfs-complete new woof-CE system (but note that the kernel being used is that of your host build system).

Now enter in terminal:

Code: Select all

export LC_ALL=C
You can now check out your new woof-CE build. For example, run Puppy application pmusic (assuming it has been installed in new woof-CE system):

In terminal enter:

Code: Select all

pmusic &
When you are finished experimenting with your chroot woof-CE system, enter:

Code: Select all

exit
and finally, clean up the chroot mounts with:

Code: Select all

umount rootfs-complete/proc && umount rootfs-complete/dev/pts && umount rootfs-complete/dev && umount rootfs-complete/sys
Note also, that whilst chroot into your new woof-CE distribution rootfs-complete it would also be possible (if you know how) to modify it (create symlinks, edit contents etc) and then rebuild the squashfs files and iso manually from the modified rootfs-complete contents.

wiak

Post Reply