Create Debian 9 (Stretch) minimal ISO similar to DebianDog

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

#201 Post by AndresC2 »

anikin wrote:
Andresc2 wrote: . . . 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. . .
I've had so many "dead" mounts . . . I don't have them anymore.

Rule #1: Once you've finished the work in chroot and done the unmounting stuff, * close * all/any terminal windows - very important!

Rule #2: (this step isn't required, but I always do it just to be on the safe side) Drop out of x and do startx again. Go to the chroot directory and if, for some reason there are still any mounted directories, right-click and unmount them manually. Follow these simple steps and you will never have "dead" mounts again. As for unmounting from inside or outside, I just follow to the letter Will Haley's howto.
Hello Anikin!

thanks for you help, I take care of that. :D

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

#202 Post by wiak »

Hello AndresC2,

How in the end did you 'take care of' your dead mounts? What procedure or commands did you end up using?

Thanks in advance for the info.

wiak

AndresC2
Posts: 76
Joined: Sun 09 Jul 2017, 02:12

#203 Post by AndresC2 »

fredx181 wrote:@Andres, I have added your suggestions to my list of possible options
(it grows and grows :) )

There is a network connection check at the start, is your request because of suddenly connection drop out, or... ?
Hello Fred!

Yes suddenly my connection drop out, then start again debootstraping.

for example: Connection drop out! Retry apt-get install?, Yes/No

and not start over again.

Thanks.

AndresC2

AndresC2
Posts: 76
Joined: Sun 09 Jul 2017, 02:12

#204 Post by AndresC2 »

Hello Wiak!

Dead mounts! I just reboot because I did it in /root or ram Frugal mode so no problem. Start all fresh.

code from jd7654 work fine.

Code:
#!/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

Anikin's rules look very good, I will try for security.

AndresC2

jd7654
Posts: 296
Joined: Mon 06 Apr 2015, 16:10

#205 Post by jd7654 »

AndresC2 wrote:code from jd7654 work fine.
Heh, I was just copying your guys' code. :wink:

Anyway, I get stuck mounts too, see relevant thread here:
http://murga-linux.com/puppy/viewtopic. ... 948#963948

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

#206 Post by rcrsn51 »

Here is a cut-down version of the Puppy PeasyDisc app with just the main burning tools. It uses xorriso instead of cdr-tools.

Note that PeasyXorBurn does NOT perform audio CD ripping or encode/decode functions. You will need a separate project like asunder.

Version 1.1 includes cdrskin as a dependency and has a new section for burning audio CDs from a folder of .wav files.

Version 1.3 has an improved remastering tool. The previous version assumed that the boot files like isolinux.bin were at the root of the ISO source folder. The new version allows them to be in a subfolder named "isolinux". This is how the Dog ISOs are structured.

-----------------------------

Remove the fake .gz extension.

-----------------------
Attachments
peasyxorburn_1.3.deb.gz
Updated 2019-10-16
Improved remastering tool
(10.1 KiB) Downloaded 76 times
peasyxorburn_1.2.deb.gz
Updated 2018-12-13
Config file added
(10.04 KiB) Downloaded 102 times
screenie.png
(76.67 KiB) Downloaded 671 times
Last edited by rcrsn51 on Wed 16 Oct 2019, 13:45, edited 8 times in total.

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

#207 Post by dancytron »

How are the repositories chosen? I don't see them in the script and they don't seem to inherit them from the distro you are running it from (which I have changed in the /ect/apt/sources.list file to debian.us.*).

The reason I ask, is the the debian.de.* servers (which I assume are in Germany) are sometimes (but not always for some reason) very slow for me here in the middle of the U.S.

Would it be possible to let us specify them in the script? If not, could you use the deb.debian.org which is supposed to pick the best mirror for you?

Thanks,

Dan

User avatar
rufwoof
Posts: 3690
Joined: Mon 24 Feb 2014, 17:47

#208 Post by rufwoof »

Typically to debootstrap you specify the release (such as jessie or stretch), the target folder and the download site/repository. From a quick look at Freds script, around line 151 has

Code: Select all

debootstrap --arch=$ARCH --variant=minbase stretch chroot http://ftp.us.debian.org/debian/
so it looks to me that its pulling down the base system from .org, which I believe includes the default /etc/apt/sources.list within that which again is also the global .org based.

In Freds script that also pulls stuff down from outside of Debian, i.e. from git, that bastardises the standard debootstrap to include other stuff (i.e. puppy type scripts) along with changing the boot process (initrd content/style) ...etc. I suspect that is .de based stuff and perhaps without any mirrors is restricted to that location alone (???).

You could add code to edit the /etc/apt/souces.list to point to a specific named Debian mirror in a similar manner to how Fred adds external repositories in around line 220 in the script. However I can't see much benefit in that compared to just using the default .org choices because as you say that tends to 'automatically find' the best choice of mirror anyway.

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

#209 Post by fredx181 »

dancytron wrote:How are the repositories chosen? I don't see them in the script and they don't seem to inherit them from the distro you are running it from (which I have changed in the /ect/apt/sources.list file to debian.us.*).

The reason I ask, is the the debian.de.* servers (which I assume are in Germany) are sometimes (but not always for some reason) very slow for me here in the middle of the U.S.

Would it be possible to let us specify them in the script? If not, could you use the deb.debian.org which is supposed to pick the best mirror for you?

Thanks,

Dan
The sources.list is copied from (extracted tar.gz from github) folder dog-boot-stretch.
It's done like that to add also contrib and nonfree
Is now: deb http://deb.debian.org/debian/ stretch main contrib non-free (I just changed to being that)
The 'dog' repository is added at a later point in the script according to if architecture is 64 or 32 bit e.g:

Code: Select all

elif [ "$ARCH" = "amd64" ]; then
sed -i '1 s|^|deb https://fredx181.github.io/StretchDog/amd64/Packages/ ./\n|' /etc/apt/sources.list
...
BTW, I forgot everytime to reply on what you wrote earlier about save2flash
I tested that few times by installing around 400MB of packages, checking the size of /mnt/live/memory/changes (is 400 mb then)
Ran save2flash, waited a while, then the size of /mnt/live/memory/changes was almost nothing.
And second time running save2flash reports copying only few kb's
So unless there's misunderstanding, I can't reproduce the behaviour you described.

Fred

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

Re: New build -- FVWM -- couldn't resist

#210 Post by fredx181 »

belham2 wrote:Hi all,

I couldn't resist doing a fvwm-crystal with the buildscript, mainly because I've never used it before. Took ~19 mins to complete. FVWM-crystal is quite interesting, fast but with a bit of a learning curve, lol. Above all it is (imho) the most beautiful of all lightweight desktop environments I have seen. It is gorgeous, and the user ability of desktop theme & icon customization built into it puts most everything else to shame. Here's some pics (what I used in the buildscript is in the first pic's title---just takeout all the lx-related stuff when the buildscript pops up---my ISO build came in at 293mb; also know that fvwm-crystal will pull in pcmanfm, despite me wanting only spacefm, so be aware of that). Hope you enjoy the pics and happy building! [Edit: the last pic is what I assigned to the mtpaint icon, and when I click on it, that is what I see. You can add & prioritize anything you want, in your icon submenu, simply by bringing the .desktop file over to jvwm root's folder and assigning a number of importance to it]
Hi Belham, looks very nice!
I wonder, did you need to do something extra to make it start, e.g. use slim or... ?
As it is now, the default session in /root/.xsession is openbox:

Code: Select all

exec openbox-session
I'm thinking of modifying that to several choices maybe (if ... then ... etc...), depending on what's installed.
Then could be that a login manager (e.g. slim) is not needed
It requires some study though, if anyone knows more about that, please help!

P.S.
There is symlink /usr/bin/x-session-manager that includes the commands for starting default window-manager, so maybe in .xsession uncomment what's there already and execute $SESSION_MANAGER:

Code: Select all

export SESSION_MANAGER=/usr/bin/x-session-manager
exec $SESSION_MANAGER
(don't know if that works in all cases, maybe most)


Fred

belham2
Posts: 1715
Joined: Mon 15 Aug 2016, 22:47

Re: New build -- FVWM -- couldn't resist

#211 Post by belham2 »

fredx181 wrote:
belham2 wrote:Hi all,

I couldn't resist doing a fvwm-crystal with the buildscript, mainly because I've never used it before. Took ~19 mins to complete. FVWM-crystal is quite interesting, fast but with a bit of a learning curve, lol. Above all it is (imho) the most beautiful of all lightweight desktop environments I have seen. It is gorgeous, and the user ability of desktop theme & icon customization built into it puts most everything else to shame. Here's some pics (what I used in the buildscript is in the first pic's title---just takeout all the lx-related stuff when the buildscript pops up---my ISO build came in at 293mb; also know that fvwm-crystal will pull in pcmanfm, despite me wanting only spacefm, so be aware of that). Hope you enjoy the pics and happy building! [Edit: the last pic is what I assigned to the mtpaint icon, and when I click on it, that is what I see. You can add & prioritize anything you want, in your icon submenu, simply by bringing the .desktop file over to jvwm root's folder and assigning a number of importance to it]
Hi Belham, looks very nice!
I wonder, did you need to do something extra to make it start, e.g. use slim or... ?
As it is now, the default session in /root/.xsession is openbox:

Code: Select all

exec openbox-session
I'm thinking of modifying that to several choices maybe (if ... then ... etc...), depending on what's installed.
Then could be that a login manager (e.g. slim) is not needed
It requires some study though, if anyone knows more about that, please help!

P.S.
There is symlink /usr/bin/x-session-manager that includes the commands for starting default window-manager, so maybe in .xsession uncomment what's there already and execute $SESSION_MANAGER:

Code: Select all

export SESSION_MANAGER=/usr/bin/x-session-manager
exec $SESSION_MANAGER
(don't know if that works in all cases, maybe most)


Fred
Hi Fred,

I had tried once build with "openbox" left in with "jvwm-crystal" while doing the build, and then I tried leaving out openbox and just using jvwm-crystal. Neither would boot into a desktop, so I immediately assumed I had to do the slim trick you taught me. I've gotten into the habit (maybe wrongly) of now doing slim with every build I try. I'll definitely try today the change in .xsession where I uncomment what's there already and then execute $SESSION_MANAGER:

Code: Select all

export SESSION_MANAGER=/usr/bin/x-session-manager exec $SESSION_MANAGER


P.S. Since budgie builds seem to fail in Stretch (others around the web in Stretch 9 are also reporting budgie issues, so it is not the buildscript), I am today going to try to do a "deepin" de build----in fact as I typing this the build is soon to be going through the motions, lol. I'll keep telling ya, Fred, but this buildscript of yours is the "cats-meow"....puuuurrrrrrrr :D

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

#212 Post by rcrsn51 »

Here is PeasyPDF ported from Puppy into Stretch-Live. Read here for instructions.

Update: PeasyPDF v4.2 has improved tools in the JPEG section for combining a set of image files into a single PDF.
Be aware that img2pdf has Python as a dependency. Get the correct package: img2pdf-old.

Update: You may occasionally need to convert a block of text into a graphic image. Most paint programs have text capability but can be awkward to use. Here is an alternate procedure.

1. Use a word processor/text editor to create the text.
2. Save it as a PDF. Hint: use Print > Print to file.
3. Run the new PeasyPDF v4.5 "PDF2Pic" tool to convert the PDF page into a graphic.
4. Use Viewnior's Toolkit > Image > Crop function to select and save the block of text.

----------------------
Attachments
snappie.png
(17.03 KiB) Downloaded 51 times
peasypdf_4.5_all.deb.gz
Updated 2020-07-07
New PDF2Pic tool
(6.89 KiB) Downloaded 53 times
peasypdf_4.4-1_all.deb.gz
Updated 2020-06-21
Minor change to Print function
(6.65 KiB) Downloaded 40 times
snappie.png
(24.82 KiB) Downloaded 457 times
Last edited by rcrsn51 on Fri 10 Jul 2020, 13:55, edited 16 times in total.

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

#213 Post by fredx181 »

rcrsn51 wrote:Here is PeasyPDF ported from Puppy into Stretch-Live. Be aware that it has ghostscript as a dependency, which is large.

Remove the fake .gz extension.
Again thanks Bill !

It's (p)easy to search for all apps provided by rcrsn51

Code: Select all

apt-get update
apt-cache search peasy
peasywifi - Reliable network manager
peasyglue - graphic-utility
peasymount - Mounts ISO/SFS files
peasyport - Network port scanner
peasypdf - Manipulate PDF documents
peasyscale - peasyscale from rcrsn51 for Puppy linux
peasyfwmon - Peasy Firewall Monitor
peasyxorburn - Simple burning tool
@ Belham,
I'll definitely try today the change in .xsession where I uncomment what's there already and then execute $SESSION_MANAGER:
I changed to that as the default just now (.xsession is one of the files copied from github)
It may not work always, but it's certainly an improvement (see below, supports Mate build)
Also added /root/Readme-xsession with info inside about whether or not use startx (and if nothing works, try installing a login manager, e.g. slim) and about Startup applications.

I just did a mate build (installed no login manager) and it booted right to the desktop with the new change to exec $SESSION_MANAGER
ISO size became 262 MB (xz compression used)
Used this:
# Base Applications Install

Code: Select all

mate-core menu leafpad gparted parted pv synaptic volumeicon-alsa alsa-utils viewnior firefox-esr=24.8.0esr-1~deb8u2 pm-utils xdotool wmctrl desktop-file-utils mime-support cryptsetup-bin squashfs-tools conky fakeroot xserver-xorg-input-evdev pfind
Fred
Attachments
mate_780x488.png
Mate Desktop (booted right to the Desktop, no tricks required)
(76.14 KiB) Downloaded 1271 times
Last edited by fredx181 on Sat 12 Aug 2017, 18:07, edited 1 time in total.

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

#214 Post by rcrsn51 »

Here is a version of ISObooter designed for Stretch-Live. It requires the following flash drive setup:

Partition #1 formatted as FAT32 for your ISOs
Partition #2 formatted as ext4 for your "changes" folders (unjournaled will be faster)

1. Install grub4dosconfig from the repos. (If you are working from Puppy, you already have it.)
2. Unpack the attached archive file. (It is NOT a fake .gz!)
3. Copy isobooter-stretch onto the flash drive.
4. Click it as usual. For each ISO, it will automatically create the "changes" folder on the second partition.

If your ISO uses a "casper" folder instead of "live", make two changes to its menu.lst entry:

a. change "/live/vmlinuz1" to "/casper/vmlinuz"
b. change "/live/initrd1.xz" to "/casper/initrd1.xz"

Some of these ISOs could be Puppies - you would just need to change their menu.lst entries into Puppy form.

Code: Select all

kernel /vmlinuz pmedia=usbflash psavemark=2 pfix=fsck
initrd /initrd.gz
Update: Version 2 now uses LABEL and UUID identifiers, which makes your flash drive more portable.

---------------
Attachments
isobooter-stretch.tar.gz
Updated 2018-01-11
Some code cleanup
(1.1 KiB) Downloaded 258 times
Last edited by rcrsn51 on Mon 15 Jan 2018, 13:30, edited 7 times in total.

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

#215 Post by rcrsn51 »

Hi Fred: Is your Mate example above made with the new PeasyWiFi (with the appfile code)?

Can you confirm that the Config, More and Check buttons now work properly?

Bill

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

#216 Post by dancytron »

fredx181 wrote:
dancytron wrote:How are the repositories chosen? I don't see them in the script and they don't seem to inherit them from the distro you are running it from (which I have changed in the /ect/apt/sources.list file to debian.us.*).

The reason I ask, is the the debian.de.* servers (which I assume are in Germany) are sometimes (but not always for some reason) very slow for me here in the middle of the U.S.

Would it be possible to let us specify them in the script? If not, could you use the deb.debian.org which is supposed to pick the best mirror for you?

Thanks,

Dan
The sources.list is copied from (extracted tar.gz from github) folder dog-boot-stretch.
It's done like that to add also contrib and nonfree
Is now: deb http://deb.debian.org/debian/ stretch main contrib non-free (I just changed to being that)
The 'dog' repository is added at a later point in the script according to if architecture is 64 or 32 bit e.g:

Code: Select all

elif [ "$ARCH" = "amd64" ]; then
sed -i '1 s|^|deb https://fredx181.github.io/StretchDog/amd64/Packages/ ./\n|' /etc/apt/sources.list
...
BTW, I forgot everytime to reply on what you wrote earlier about save2flash
I tested that few times by installing around 400MB of packages, checking the size of /mnt/live/memory/changes (is 400 mb then)
Ran save2flash, waited a while, then the size of /mnt/live/memory/changes was almost nothing.
And second time running save2flash reports copying only few kb's
So unless there's misunderstanding, I can't reproduce the behaviour you described.

Fred
Thanks for changing the repository. I am sure that will help.

You understand the save2flash problem correctly. Every build I've done still doesn't work correctly. All my builds are 64 bit. Have you tried it on a 64 bit build? Maybe related to the double mount point issue? Anything else I can do to try to run it down?

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

#217 Post by fredx181 »

rcrsn51 wrote:Hi Fred: Is your Mate example above made with the new PeasyWiFi (with the appfile code)?

Can you confirm that the Config, More and Check buttons now work properly?

Bill
Yes, newest peasywifi script and all fine, leafpad firefox pcmanfm open with the buttons you mentioned.
First time clicking the tray icon there's Xdialog message about editing /etc/pwf/appfile for helper applications.

Fred

jd7654
Posts: 296
Joined: Mon 06 Apr 2015, 16:10

#218 Post by jd7654 »

fredx181 wrote:I just did a mate build (installed no login manager) and it booted right to the desktop with the new change to exec $SESSION_MANAGER
ISO size became 262 MB (xz compression used)
Used this:
# Base Applications Install

Code: Select all

mate-core menu leafpad gparted parted pv synaptic volumeicon-alsa alsa-utils viewnior firefox-esr=24.8.0esr-1~deb8u2 pm-utils xdotool wmctrl desktop-file-utils mime-support cryptsetup-bin squashfs-tools conky fakeroot xserver-xorg-input-evdev pfind
Excellent! Mate DebLive-Stretch works perfectly.(I always have to add synaptics and firmware-nonfeee for touchpad and wifi to work) Thanks for the recipe.

To that end, I don't think it hurts to provide working recipies for various desktops. So much of coding is learning from existing examples. So you could provide those base desktop recipies in the script, or as separate readme file or link. Or optionally in the gui as a dropdown list for Openbox, Lxde, Mate, Xfce, etc. that populates the input box. If you do that, you actually surpass the Porteus ISO builder, because the option is there but details are not obscured.

And are you going to update page 1 with the link to the gui script? Or waiting till more updates are done such as ARCH, apps section, etc?

Lastly, I upvote the request for keeping and using local cache for downloads, instead of downloading each time script is run. Since this is not a rolling release, not a lot is changing, and checking latest version may not be needed. Saves on time and bandwidth usage.

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

#219 Post by fredx181 »

dancytron wrote:You understand the save2flash problem correctly. Every build I've done still doesn't work correctly. All my builds are 64 bit. Have you tried it on a 64 bit build? Maybe related to the double mount point issue? Anything else I can do to try to run it down?
Yes, tested on 64 bit also, but I will do again few times.
So the folder /mnt/live/memory/changes has the same size after doing save2flash for you ?
No idea how to run it down else.
I think btw, what you call the double mountpoint bug is only with quick-remaster (as you said earlier, when pausing the script and going in the remaster directory) not the bug as it was some time ago, I guess (without running quick-remaster)

EDIT: I test with save to folder, from what I know you wrote in the past, you use also.
(but I expect save to file (save on exit) and save2flash shouldn't make any difference with save to folder)

Fred
Last edited by fredx181 on Sat 12 Aug 2017, 19:16, edited 1 time in total.

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

#220 Post by dancytron »

fredx181 wrote:
dancytron wrote:You understand the save2flash problem correctly. Every build I've done still doesn't work correctly. All my builds are 64 bit. Have you tried it on a 64 bit build? Maybe related to the double mount point issue? Anything else I can do to try to run it down?
Yes, tested on 64 bit also, but I will do again few times.
So the folder /mnt/live/memory/changes has the same size after doing save2flash for you ?
No idea how to run it down else.
I think btw, what you call the double mountpoint bug is only with quick-remaster (as you said earlier, when pausing the script and going in the remaster directory) not the bug as it was some time ago, I guess (without running quick-remaster)

Fred
Just checked it. Yes, the folder /mnt/live/memory/changes is the same size after doing save2flash.

edit: When I run save2flash from lxterminal, I get this

Code: Select all

root@live:~# save2flash
Not saved yet session data:
20M
Your save file/folder has free space:
18068 MB
Merging /mnt/live/memory/changes onto /mnt/live/memory/images/changes-exit...
cat: /tmp/skip_files: No such file or directory
root@live:~# 
I don't know it makes any difference, but these are the two menu.1st entries I've been using.

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

title TrinityDog   (sda2) noauto from=/TrinityDog/ changes=EXIT:/TrinityDog/
root (hd0,1)
kernel (hd0,1)/TrinityDog/live/vmlinuz1 noauto from=/TrinityDog/ changes=EXIT:/TrinityDog/
initrd (hd0,1)/TrinityDog/live/initrd1.xz

Post Reply