Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 14 Dec 2019, 23:18
All times are UTC - 4
 Forum index » Advanced Topics » Puppy Projects
Create Debian 9 (Stretch) minimal ISO similar to DebianDog
Moderators: Flash, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 11 of 103 [1533 Posts]   Goto page: Previous 1, 2, 3, ..., 9, 10, 11, 12, 13, ..., 101, 102, 103 Next
Author Message
wiak

Joined: 11 Dec 2007
Posts: 1842
Location: not Bulgaria

PostPosted: Wed 09 Aug 2017, 17:51    Post subject:  

It is sometimes useful to generate a logfile of the whole mklive-stretch run as well as watching progress in a terminal. The following command should do that I think:

Code:
mklive-stretch 2>&1 | tee mklive-stretch.log


Might be nice to also have log as a gui checkbox option (harder to arrange though).

I do similar when running debootstrap on its own because the self-generated chroot/debootstrap/debootstrap.log only gets written when there are errors.

wiak
Back to top
View user's profile Send private message 
jd7654

Joined: 06 Apr 2015
Posts: 297

PostPosted: Wed 09 Aug 2017, 20:17    Post subject:  

fredx181 wrote:
For if you'd like to try now to make a 32bit build on 64bit host, you can edit the script by adding on line 67: export ARCH="i386" , so becomes this:
Code:
echo -e "\e[0;32mBuilding will be done in: $PWD/stretch\033[0m"
read -sp "Press ENTER to continue . . . "
echo
echo
export ARCH="i386" # this is a hack :)


Then the message still shows "building live system for 64-bit" but it will create 32bit build
Don't forget to remove on line 67 if you want to make 64bit build later.

In the GUI script it's line 75

I tested this hack and works!


Excellent! Worked perfect from StretchDog64 creating i386 DebLive-Stretch.

Hmmm...that revealed a small issue I was chasing down:

I was mostly building 64-bit builds, and for some reason the resulting fonts were all ginormous, for desktop, logout dialog, conky, xterm, etc. Some off the screen or beyond the window.
It can be fixed, but I remember it being small/normal once before without me having to do any changes, and not sure if it was something with build.

Anyway, using same distro and same script except with ARCH specified for i386, the resulting fonts are normal. So is there something different for the 64-bit build that has the extra large font issue?


EDIT: Scratch that, ran again and commented out ARCH change, and fonts are normal again. So back to the drawing board, not sure what causes extra large fonts in 64-bit build sometimes.

Last edited by jd7654 on Wed 09 Aug 2017, 20:54; edited 1 time in total
Back to top
View user's profile Send private message 
wiak

Joined: 11 Dec 2007
Posts: 1842
Location: not Bulgaria

PostPosted: Wed 09 Aug 2017, 20:32    Post subject: add cpio as a dependency for mklive-stretch  

Hi Fred (and Peebee),

Just want to tidy up a loose-end. Though best to run mklive-stretch directly in Puppy, if using that system, it would be good to know that mklive-stretch would also work from inside a debootstrap Debian chroot system as Peebee tried but failed.

Anyway, solution was simple - nothing wrong with the idea itself, problem is simply that debian stretch variant=minbase peebee used doesn't contain cpio program, which is a dependency of mklive-stretch. Simple fix if you don't mind is to include cpio here (I added cpio in here):

Code:
if [ $(command -v apt-get 2>/dev/null) ];then
 echo -e "\e[0;36mUpdate the package lists...\033[0m"
 apt-get update
 echo -e "\e[0;36mInstall some required packages, e.g. debootstrap, squashfs-tools, etc...\033[0m"
 apt-get install debootstrap wget xorriso isolinux xz-utils squashfs-tools cpio -y --force-yes
 [ $? -eq 0 ] && echo -e "\e[0;32mOK\033[0m" || echo -e "\e[0;31mFAILED\033[0m"
fi


Alternatively in any debootstrap build you can --include=programs_separated_by_commas.

All works running mklive-stretch inside a chroot debian system once cpio is installed on that debian. Even the iso is correctly produced since above code installed xorriso.

Small Discovery perhaps of interest:

I created my debootstrapDebian system as an i386 (32bit) system even though I did so on XenialDog64 (64bit system). No particular reason, but interesting result discovered:

I then copied mklive-stretch into my chroot/usr/sbin folder and after chroot chroot command ran from chroot dir /:

Code:
mklive-stretch 2>&1 | tee mklive-stretch.log


What I forgot about is that mklive-stretch detects the underlying kernel system is 64-bit so proceeds to build the new Debian Stretch as a 64-bit system (even though the debootstrapDebian I was running it in was 32-bit).

The accidental discovery is that the build in this case (a 64-bit target from a "32-bit" host) works because the kernel being used remains the 64-bit one of the real host XenialDog64 system. So the underlying kernel is the key, not the libs and so on. I note that Peebee has recently built a 32-bit LxPupSc system but with a 64-bit kernel driving that, so in that case that system would also be able to build i386 or amd64 mklive-stretch systems.

(Of course, the machine itself must be capable of running a 64-bit kernel)

wiak
Back to top
View user's profile Send private message 
AndresC2

Joined: 08 Jul 2017
Posts: 76

PostPosted: Thu 10 Aug 2017, 00:47    Post subject:  

Hello Fred!

from Wheezy run script in /root this happen:

/bin/bash: chroot_in:command not found

thanks.
Back to top
View user's profile Send private message 
wiak

Joined: 11 Dec 2007
Posts: 1842
Location: not Bulgaria

PostPosted: Thu 10 Aug 2017, 00:59    Post subject:  

AndresC2 wrote:
Hello Fred!

from Wheezy run script in /root this happen:

/bin/bash: chroot_in:command not found

thanks.


EDIT: @AndresC2:

Just realised I had already used mklive-stretch in a debian (stretch) distribution that used dash as its default shell; there was no problem with function chroot_in. Let us know if you get that solved please.


I am wondering what your underlying system default shell is. Is it dash rather than bash. Maybe if you have dash as main shell, somehow the command in mklive-stretch: chroot chroot /bin/bash -c chroot_in loses the bash-required export function facility (export -f chroot_in). Not sure why that should be since the script itself starts with #!/bin/bash, but that's all I can think of. There are certainly such issues in bash/gtkdialog type scripts used in Puppy Linux because internally gtkdialog makes system shell commands so if system shell not bash then doesn't work as expected.

wiak

Last edited by wiak on Thu 10 Aug 2017, 04:47; edited 1 time in total
Back to top
View user's profile Send private message 
AndresC2

Joined: 08 Jul 2017
Posts: 76

PostPosted: Thu 10 Aug 2017, 01:39    Post subject:  

Hello wiak! Very Happy

my scripts have #!/bin/bash and run fine, how to know my default shell?

i split the script and first part run fine but second part that begin with:

chroot_in () {

give me this /bin/bash: chroot_in:command not found.

my another option willhaley.com/blog/create-a-custom-debian-live-environment/

work fine.

thanks. Very Happy
Back to top
View user's profile Send private message 
wiak

Joined: 11 Dec 2007
Posts: 1842
Location: not Bulgaria

PostPosted: Thu 10 Aug 2017, 01:46    Post subject:  

AndresC2 wrote:
Hello wiak! Very Happy

my scripts have #!/bin/bash and run fine, how to know my default shell?


To check your default shell, in a terminal type command:

Code:
echo $0


On second thoughts, maybe terminal used will muck that up, so alternative (better maybe) check would be:

Code:
ls -al /bin/sh


That will show what /bin/sh is symbolically linking to (either bash or dash).

If result is not bash, you could temporarily try changing underlying system shell to bash and then running mklive-stretch from the beginning, to see if that fixes the error you've been getting. To change shell to bash in debian use command (need to be root user to do this):

Code:
dpkg-reconfigure dash

or

sudo dpkg-reconfigure dash


and follow the instructions that appear.

If you later want to change default shell back to bash, again use:

Code:
dpkg-reconfigure dash


wiak
Back to top
View user's profile Send private message 
wiak

Joined: 11 Dec 2007
Posts: 1842
Location: not Bulgaria

PostPosted: Thu 10 Aug 2017, 01:55    Post subject:  

May well be nothing to do with dash or bash as system shell admittedly.

What do you mean you split the script by the way?

The code:

Code:
export -f chroot_in


is what exports the function to the bash environment but that export will probably be gone once script exits so you have to be careful the function is still exported if you are somehow modifying things to run the script in two parts.

wiak
Back to top
View user's profile Send private message 
AndresC2

Joined: 08 Jul 2017
Posts: 76

PostPosted: Thu 10 Aug 2017, 02:04    Post subject:  

thanks wiak!

some question about this:

proc:device is busy,
dev:device is busy

this happen when not umount binds correctly.

that is better umount binds inside of chroot or outside?

how stop proc:device is busy or
dev:device is busy, after of a bad umount binds?
in console show, try lsof 8 or fuser(1) something like that.

thanks.

Andresc2
Back to top
View user's profile Send private message 
wiak

Joined: 11 Dec 2007
Posts: 1842
Location: not Bulgaria

PostPosted: Thu 10 Aug 2017, 02:35    Post subject:  

Not sure about the umounting; my natural reaction is to exit the chroot and do the umounting outside.

But you didn't say if you resolved the export -f chroot_in problem you were having?

wiak

EDIT: Though I don't really understand your question, maybe this link will help you:

https://unix.stackexchange.com/questions/120827/recursive-umount-after-rbind-mount
Back to top
View user's profile Send private message 
wiak

Joined: 11 Dec 2007
Posts: 1842
Location: not Bulgaria

PostPosted: Thu 10 Aug 2017, 02:46    Post subject:  

Or maybe use:

Code:
umount -l fs_to_umount


From umount man page:

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

Quote:
-f
Force unmount (in case of an unreachable NFS system). (Requires kernel 2.1.116 or later.)


Also: https://serverfault.com/questions/172841/how-do-i-unmount-a-bound-proc-in-a-dead-chroot

wiak

But maybe getting a bit too off-topic. The export -f chroot_in situation of more interest.
Back to top
View user's profile Send private message 
zagreb999

Joined: 11 Apr 2014
Posts: 535
Location: Yugoslavija

PostPosted: Thu 10 Aug 2017, 03:51    Post subject: mklive-stretch GUI  

hi fred,

in debiandog 32 bit-fat32-
mklive-stretch GUI works great.

can you create new mklive-xenial GUI
or mklive-antix.mx GUI?

regards.
Back to top
View user's profile Send private message 
wiak

Joined: 11 Dec 2007
Posts: 1842
Location: not Bulgaria

PostPosted: Thu 10 Aug 2017, 04:45    Post subject:  

@AndresC2:

Just realised I had already used mklive-stretch in a debian (stretch) distribution that used dash as its default shell; there was no problem with function chroot_in. Let us know if you get that solved please.
Back to top
View user's profile Send private message 
anikin

Joined: 10 May 2012
Posts: 1020

PostPosted: Thu 10 Aug 2017, 05:14    Post subject:  

anikin wrote:
. . .
Regarding debootstrap not working in XenialDog, I think, I know why, but I need to download and install XenialDog and try running debootstrap from it.

In a nutshell, here's why debootstrap fails in XenialDog:

Debian Stretch was supposed to have this new feature: https://wiki.debian.org/UsrMerge
However, at the end of the day, that plan had been scrapped, http://www.phoronix.com/scan.php?page=news_item&px=Debian-Installer-Stretch-RC1 because of a bug discovered in debootstrap version 0.85. Supposedly, that version of debbotstrap had been used to build Ubuntu Xenial. See here for more details:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=843073
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=844221

So, this is an inherited bug. It was present in the early builds of Ubuntu Xenial. To cut it short, if you rebuild Xenial today, it will be debootstrap friendly.
Back to top
View user's profile Send private message 
wiak

Joined: 11 Dec 2007
Posts: 1842
Location: not Bulgaria

PostPosted: Thu 10 Aug 2017, 06:20    Post subject:  

anikin wrote:
Supposedly, that version of debbotstrap had been used to build Ubuntu Xenial. See here for more details:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=843073
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=844221


Where does the info about that debootstrap being used to build xenial come from? I don't see xenial mentioned in these links. By the way 64-bit XenialDog works fine with debootstrap; the issue is only with 32-bit XenialDog.

Fred,

Using XenialDog64, I built a i386 minbase xenial using debootstrap and that went fine. I then rebooted and used that debootstrap 32-bit xenial build folder via chroot in XenialDog32 (to have the xenial 32bit kernel) and inside that new 32bit xenial used debootstrap to build a 32-bit Debian Stretch minbase(!), and that also went fine. However, debootstrap certainly still does not work in XenialDog32 itself. I guess from my above test of new debootstrap built xenial i386 that a rebuild of XenialDog32 would fix the issue.

wiak
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 11 of 103 [1533 Posts]   Goto page: Previous 1, 2, 3, ..., 9, 10, 11, 12, 13, ..., 101, 102, 103 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Puppy Projects
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0825s ][ Queries: 12 (0.0249s) ][ GZIP on ]