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 Tue 23 Oct 2018, 03:46
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
DebianDog HowTo thread
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 6 of 10 [146 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 Next
Author Message
backi

Joined: 27 Feb 2011
Posts: 1563
Location: GERMANY

PostPosted: Wed 19 Oct 2016, 10:04    Post subject:  

Cool compendium fred !

But just one question
Maybe my question is a bit naive .........

but could this also be accomplished by extracting a Debian Dog Iso (or any Debian live Iso ) ...
and just copying the live Folder to the " persistence " labeled partition (or into an Folder on it ) ?

If not ...what makes the difference--- what would be wrong with this idea ?
Back to top
View user's profile Send private message 
fredx181


Joined: 11 Dec 2013
Posts: 3485
Location: holland

PostPosted: Wed 19 Oct 2016, 11:22    Post subject:  

backi wrote:
Cool compendium fred !

But just one question
Maybe my question is a bit naive .........

but could this also be accomplished by extracting a Debian Dog Iso (or any Debian live Iso ) ...
and just copying the live Folder to the " persistence " labeled partition (or into an Folder on it ) ?

If not ...what makes the difference--- what would be wrong with this idea ?


Not sure I understand well, if you mean:
Instead using empty filesystem.squashfs, just use the original?
Yes that can be also, see at EDIT in DD64 howto about this subject:
http://murga-linux.com/puppy/viewtopic.php?p=916339#916339
(but still the vmlinuz and initrd files must be in /boot (to be found when upgrading kernel/initrd)

I'm sure if you'd like to try with it, rufwoof or I will help you.

Fred

_________________
Dog Linux website
Back to top
View user's profile Send private message 
rufwoof

Joined: 24 Feb 2014
Posts: 2605

PostPosted: Wed 19 Oct 2016, 11:48    Post subject:  

fredx181 wrote:
Note:Doing a kernel upgrade when using DebianDog openbox_xfce version 2016-10-16 you'll lose LZ4 support (booting and mounting LZ4 compressed .squashfs modules).
(because the official Debian kernel doesn't have it built in)


Debian stable does include lzop (lzo) support. lzo level 1 compression is pretty close to lz4 in my experience for speed. You can use busybox version to compress files, see
busybox lzop --help. mksquashfs and unsquashfs supports lzo ... but don't cater for compression level setting (I think it uses level 6 or 7).
Back to top
View user's profile Send private message 
rufwoof

Joined: 24 Feb 2014
Posts: 2605

PostPosted: Wed 19 Oct 2016, 12:24    Post subject:  

backi wrote:
could this also be accomplished by extracting a Debian Dog Iso (or any Debian live Iso ) ...
and just copying the live Folder to the " persistence " labeled partition (or into an Folder on it ) ?

That's the way I originally did it. Opened the ISO and copied the /live folder to the HDD 'persistence' labeled partition, I then extracted the filesystem squashfs content to the root / level. That involves two stages as you can't extract to a non empty folder, so I just
unsquashfs -d /t filesystem.squashfs
to extract all files to a folder /t
and then dragged/dropped (moved) all of that /t folder content up to the / level (and then deleted the then empty /t folder).

EDIT just noticed Fred used the -f unsquash switch/parameter to extract things directly to a non-empty / folder ... neat, avoids having to to the two stage extract and move operation that I was using.

Then with everything extracted from the main filesystem squashfs is in effect redundant so you can create a empty version of that
cd /live
rm filesystem.squashfs
mkdir t
mksquashfs t filesystem.squashfs

You also have to edit /etc/apt/sources.list to add additional repositories such as contrib and non-free, mine looks like

###### Debian Main Repos
deb http://ftp.uk.debian.org/debian/ jessie main contrib non-free

###### Security
deb http://security.debian.org/ jessie/updates main contrib non-free

I later installed grub2 and either boot that by chaining from my grub4dos bootloader, or boot the frugal style directly i.e. my menu.lst looks something like

# menu.lst
color white/blue black/cyan white/black cyan/black
timeout 2
default 1

title Debian FULL Install RW
find --set-root /debian-usb
configfile /boot/grub/menu.lst
commandline

title Debian Jessie Frugal RO only saves if run flush2disk
find --set-root /live/frugalboot
kernel /vmlinuz boot=live timezone=Europe/London xorg-resolution=1280x768 config nofastboot persistence persistence-read-only persistence-label=persistence quickreboot noprompt showmounts live-media-path=/live/ config rw
initrd /initrd.img

Note that I created empty content debian-usb and frugalboot files specifically for grub4dos to 'find'.

IIRC when I installed grub2 I believe I installed to the partition rather than the mbr, and it set it up as a legacy grub2 i.e. created another menu.lst in the /boot/grub folder rather than standard grub2 format. That boot menu offers standard boot, single user boot and memtest boot modes ... and boots as though a fully installed version (read write, all changes written to disk as they occur etc.).

Uses 4.7GB of disk space in total on my system, that has quite a few other things installed (Libre, skype ..etc). I originally allocated 16GB of space to the partition (8GB would perhaps have been more than enough, but I didn't know how much space was likely to be used beforehand).

More often you can install updates within the frugal booted session. Ensuring you run flush2disk (modified version of save2flash) afterwards. In some cases however updates might fail, such as kernel or main libc updates. If so just don't save after trying that failed update, and reboot into the full/read-write session and run the updates again. That's about the only time I boot the full read/write mode (mostly boot frugal and more usually don't bother saving). As part of that approach (tending to frugal boot and not save), I've sym linked a home folder to the persistent layer, so any changes in that folder are preserved no matter what i.e. sym linked a ~/documents-persistent link to /lib/live/mount/persistence/sda1/documents-persistent. I also sym linked .osmo folder in a similar manner, so all changes in the diary/calendar/notes persist across reboots.

IME it boots slower and initially runs slower than pure frugal where everything is in a squashfs (as its reading uncompressed data from disk instead). But once its been running for a while there's little apparent difference in speeds. i.e. once you've loaded say Libre Calc once, that tends to remain memory bound (cached) anyway, so second/subsequent loads are just as quick either way.

I don't bother with sfs's anymore. Find it just as easy if not easier to boot frugally and install anything I want from the repository using apt-get or synaptic and then not bother saving that session. I am on a relatively fast internet connection however, such that installing via the net is pretty quick (seconds). For things I use more often, I just boot, install and then save the session (flush2disk), so they become part of the core 'full install' (and frugal boot) for all subsequent reboots.
Back to top
View user's profile Send private message 
rufwoof

Joined: 24 Feb 2014
Posts: 2605

PostPosted: Wed 19 Oct 2016, 12:37    Post subject:  

fredx181 wrote:

(but still the vmlinuz and initrd files must be in /boot (to be found when upgrading kernel/initrd)

I have initrd.img and vmlinuz files in the / folder, that are sym links to actual initrd and vmlinuz files in the /boot folder (that have longer file names that show the versions).

i.e.

/vmlinuz sym link to /boot/vmlinuz-3.16.0-4-amd64
/initrd.img sym link to /boot/initrd.img-3.16.0-4-amd64

So menu.lst (grub4dos) can just point to those root level vmlinuz and initrd.img files

Seems to be updating ok i.e.

user@debian:~$ uname -a
Linux debian 3.16.0-4-amd64 #1 SMP Debian 3.16.36-1+deb8u1 (2016-09-03) x86_64 GNU/Linux
Back to top
View user's profile Send private message 
rufwoof

Joined: 24 Feb 2014
Posts: 2605

PostPosted: Wed 19 Oct 2016, 12:45    Post subject:  

This is the flush2disk that I currently use.

Uses dialog so not tied into gtk2 or gtk3 or whatever (dialog is more generic, but not as pretty).
flush2disk.gz
Description  remove fake .gz suffix and install to /usr/local/bin and make executable
gz

 Download 
Filename  flush2disk.gz 
Filesize  9.86 KB 
Downloaded  110 Time(s) 
Back to top
View user's profile Send private message 
rufwoof

Joined: 24 Feb 2014
Posts: 2605

PostPosted: Thu 20 Oct 2016, 05:44    Post subject:  

Coincidental! A day later and Debian have updated the kernel (I noticed this morning after booting frugally and running apt-get update; apt-get upgrade). Rebooted without saving. Booted full read/write style and applied the updates before rebooting back into frugal again.

Now :
user@debian:~$ uname -a
Linux debian 3.16.0-4-amd64 #1 SMP Debian 3.16.36-1+deb8u2 (2016-10-19) x86_64 GNU/Linux

Its a security fix/update

https://www.debian.org/security/2016/dsa-3696
Code:
Several vulnerabilities have been discovered in the Linux kernel that may lead to a privilege escalation, denial of service or information leaks.

    CVE-2015-8956 It was discovered that missing input sanitising in RFCOMM Bluetooth socket handling may result in denial of service or information leak.

    CVE-2016-5195 It was discovered that a race condition in the memory management code can be used for local privilege escalation.

    CVE-2016-7042 Ondrej Kozina discovered that incorrect buffer allocation in the proc_keys_show() function may result in local denial of service.

    CVE-2016-7425 Marco Grassi discovered a buffer overflow in the arcmsr SCSI driver which may result in local denial of service, or potentially, arbitrary code execution.

    Additionally this update fixes a regression introduced in DSA-3616-1 causing iptables performance issues (cf. Debian Bug #831014).

CVE-2016-5195 fixes the "Dirty COW" vulnerability (researchers have discovered attack code that indicates the Dirty COW vulnerability is being actively exploited in the wild) which has been present in the Linux kernel since version 2.6.22 in 2007, and is also believed to be present in Android http://thehackernews.com/2016/10/linux-kernel-exploit.html
Back to top
View user's profile Send private message 
mikeslr


Joined: 16 Jun 2008
Posts: 2700
Location: 500 seconds from Sol

PostPosted: Sun 02 Apr 2017, 21:11    Post subject: USB-Key Frugal Install with Grub4Dos from a Linux OS
Subject description: Package can also install to Hard-drive
 

Hi All,

Edit: This post has been substantially edited in response to rcrsn51’s advice and to take advantage of the package fredx181 provided. See the next couple of posts. The attached weeinst4XenialDog64.tar.gz package is identical to the package fredx181 provided on the dCoreDog thread, except that I’ve edited the included menu.lst to use with XenialDog64, and the readme file to discuss some possible considerations.

Perhaps other Linux bootloaders can manage a Frugal Install to a USB-Key. But I’m familiar with booting the DebianDogs and Puppies using grub4dos, and grub4dos poses a challenge when running another Linux. It isn’t to be found on their Repositories.

Either the attached weeinst4XenialDog64.tar.gz or fred’s package can be used with other DebianDog and most Puppies, and applied to Hard-drives. Such usage is explained after the recipe for installing XenialDog64 to a USB-Key.

The following is based on my experience using Peppermint Linux. My memory is except for using firefox to download files, everything else had to be done as root/Administrator. [As I had previously preformed steps 1 thru 11 running Peppermint, the "weeinst..." package was tested by deleting gldr from the Key, then copying weeinst’s included files to it and performing Step 13 below].

Running peppermint linux, or any Ubuntu or debian [adjust as needed for your Linux of Choice]

1. Open synaptic and install gparted.
2. Plug in the USB-Key and start gparted.
3. Format the Key to Ext3 (or 4 and probably not 2). [2 is more easily corrupted, and 4 may be overkill]. Exit gparted.
4. Using your web-browser (peppermint’s default is firefox) download the attached weeinst4XenialDog.tar.gz. [By default under peppermint, firefox downloads stuff to your Downloads folder. That location will be assumed in the following Steps].
5. Using your web-browser download XenialDog64’s ISO.
6. Open the Linux Archive Manager, Select XenialDog64’s ISO, and extract the folder named casper to the Download folder.
7. Open the Linux Archive Manager, select weeinst4XenialDog64.tar.gz, and extract all the following files: grldr, menu.lst, readme, weeinst, wee.mbr. [Depending on your Archiver, these files may appear in the Download folder itself, or in a folder named weeinst4XenialDog64xxx in the Download folder].
8. Open the readme file and the menu.lst in a text editor and read them. Decide if you want to continue and/or make any changes to menu.lst. Make any such changes.
9. Close any “user” file-manager windows (to avoid confusion) and open two File-manager windows as root*, one to the Download folder and the second to the USB-Key. [IIRC, Peppermint's file manager is called nemo. If so, you can open a terminal and type sudo nemo, then enter your password. But, I sort of recall some other way ? Right-click nemo or open nemo and then right-click something?. At any rate, opening it via terminal will not create an unnecessary and possibly confusing opened file-manager as user].
10. In the window to the USB-Key create a folder named xendog64 [unless you decided to do something else on Step 8].
11. From the Download folder select the folder named casper, select Edit>copy, then paste it into the xendog64 folder. [You may have to click the xendog64 folder to enter it. If so, after casper is pasted, return to the root/top of the USB-Key].
12. From the Download folder select the files named grldr, menu.lst, weeinst, and wee.mbr, select Edit>copy, then paste them into the root (top) of USB-Key. [Tip: Many File-Managers enable you to copy and paste multiple files at the same time if you (a) click on an empty space in a folder [to establish focus] then press Ctrl-A (all), then place the mouse-cursor on any file, left-press and precede as if working only with that file].
13. Open a terminal as root to or at the root/top of the USB-Key, then enter the following code:

./weeinst

You should now have a USB-Key which will boot into XenialDog64.

-------
The package can be used to install a new mbr and its other files to a hard-drive/partition. If you have other OSes on the drive, be sure you want to overwrite the current mbr. If you can boot into another OS on the computer, you're probably better off adding your DebianDog or Puppy to the boot options currently available.

Use of the weeinst4XenialDog64.tar.gz package with other DebianDogs:

Casper is the name of the folder containing the operating system in DebianDogs based on Ubuntus. If a Debiandog is based on debian, itself, the folder will be named live. Within the casper or live folder will be files generically referred to as initrd and vmlinuz. The actual names used in a specific “Dog” may be slightly different, e.g. initrd.gz and vmlinuz1. Examine the files within the casper or live folder to ascertain the exact names used. And, of course, the unique name of the folder (if any) into which casper/live is copied and the title by which this operating system will appear in menu.lst are your choice. Make the appropriate changes to menu.lst].

Use of the weeinstXenialDog64.tar.gz with Puppies:

Read the opening posts and release notes of any Puppy you are interested in to find out if any specific installation instructions must be followed. If not, and if the computer you’re working with does not require a (U)efi boot, it is likely that the weeinst4XenialDog64 package can be used to create a bootable Frugal Puppy install on a USB-Key.

Unlike DebianDogs, the operating system files of Puppies are not contained within a folder such as Ubuntu’s casper. So Step 6 and 11 have to be modified to extract and copy, respectively, all the following files: initrd, vmlinuz and every file ending with sfs, for example puppy_xenial_7.0.4.sfs and adrv_lina_1.2.sfs.

And as with the DebianDogs, see above, the specific names of initrd and vmlinuz may be different; and the name of the folder (if any) into which you copy “the operating system”, and the title which will appear on menu.lst are your choice. Appropriate changes must be made to the menu.lst.

As an example, on one of my USB-Keys, tahrpup’s files are located in a folder named tahr32 on that drive’s 2nd partition. The following stanza is on menu.lst.

title Puppy tahr 6.0.5 (USBKey/tahr32)
find --set-root --ignore-floppies --ignore-cd /tahr32/initrd.gz
kernel /tahr32/vmlinuz psubdir=tahr32 pmedia=usbflash pfix=fsck
initrd /tahr32/initrd.gz

In the absence of the “find –set-root” argument –which searches for a file named initrd.gz in a folder named tahr32-- I could have manually instructed which vmlinuz and initrd to use with root(hd0,1) or by declaring that partition’s UUID.

mikesLr
weeinst4XenialDog64.tar.gz
Description  Package to install mbr, grldr and menu.lst with instructions. See included readme and above to use with other Dogs and Puppies
gz

 Download 
Filename  weeinst4XenialDog64.tar.gz 
Filesize  136.62 KB 
Downloaded  83 Time(s) 

Last edited by mikeslr on Wed 05 Apr 2017, 21:19; edited 13 times in total
Back to top
View user's profile Send private message 
fredx181


Joined: 11 Dec 2013
Posts: 3485
Location: holland

PostPosted: Mon 03 Apr 2017, 05:35    Post subject:  

Thanks Mike,

Just one other thing is also required and you didn't mention (but I may be wrong or have missed something):
The MBR needs to be installed also, otherwise it won't boot.
Here's a simple way that does it all :
http://murga-linux.com/puppy/viewtopic.php?p=947504#947504
(but it has dcore-xenial entry in included menu.lst, just replace that by any other, DebianDog, Xenialdog, Puppy etc..)

Fred

_________________
Dog Linux website
Back to top
View user's profile Send private message 
mikeslr


Joined: 16 Jun 2008
Posts: 2700
Location: 500 seconds from Sol

PostPosted: Mon 03 Apr 2017, 10:08    Post subject: Not sure MBR was necessary
Subject description: But easier to do than not and discover problems later
 

Thanks fred,

I'm not sure installation of mbr is necessary. My recipe left out trial and error steps I thought unnecessary. What actually happened was that when I opened my browser to the 'Lin n' Win' site (for the first time in years) I discovered it now offered instructions for Windows 7. Figuring those might use a more recent version of grldr, I followed them to the page which offered grldr for Windows 7. On that page was also a link to download grldr.mbr. So I downloaded and copied both to the root of the USB-Key,

That, however, didn't produce a bootable key, So IIRC, I ran gparted again and started from scratch resulting in the recipe in the previous post. But, maybe I didn't run gparted and only installed grldr from the XP instruction page.

Will examine the key to see if mbr is present. But, even if it isn't, the addition of mbr can't hurt and may be necessary for some computers.

Edit: A visual examination did not disclose grldr.mbr's presence. The Key, however, had originally been factory set as Fat32 and bootable. Examination of Key visually and via pfind shows nothing concerning it. But, that would be expected if mbr exists at the machine level. See the following posts, especially rcrsn51's.

As soon as I can, I'll revise my "recipe" to make use of the package fredx181 provided on the dcore thread.

mikesLr

Last edited by mikeslr on Mon 03 Apr 2017, 12:40; edited 2 times in total
Back to top
View user's profile Send private message 
rufwoof

Joined: 24 Feb 2014
Posts: 2605

PostPosted: Mon 03 Apr 2017, 11:19    Post subject:  

I have managed to install grub4dosconfig from the DebianDog repository into a purer Debian installation and IIRC it worked other than leaving some kind of dialog (likely because of the lack of a required interface library (again IIRC dialog had been installed, so it wasn't that)). Not far off perhaps from being apt2sfs'd but using a more generic grub4dosconfig - so others could just activate it as a sfs in their Linux.

Currently I've been trying to get a image of a small usb boot loader that's grub4dos based. i.e. usb with grub4dos mbr installed, menu.lst, grldr ... and a initrd.img and vmlinuz of my choosing (in particular a initrd that's been modified to load up NTFS in read/write mode).

So far it works, but I used a 16GB USB to create a 64MB USB partition and dd copying that and dd writing back again results in 2 partitions/USB drives being shown (sdb1 and sdb2 of which sdb2 is inaccessible). Perhaps because I used dd of 80MB (bs=1M count=80) to copy the image.

What I'm looking at is to have a small (64MB) bootable USB image that can be downloaded and written to a USB, along with a main file filesystem (in my case a debian livecd type system single file) that can be downloaded onto either a ext or ntfs partition ... that the usb boots ... that provides two boot choices of either a read only session (no changes preserved), or a read/write session (all changes preserved). Other than the 2 usb partitions it seems to be working ok at present. Single large file of main filesystem, that can be moved between ext and ntfs and still boots ok. As and when I get that sorted that would be yet another method to more generally get a copy of a grub4dos type bootloader ... i.e. perhaps via a grub4dos sfs, or a small usb image.
Back to top
View user's profile Send private message 
rcrsn51


Joined: 05 Sep 2006
Posts: 12324
Location: Stratford, Ontario

PostPosted: Mon 03 Apr 2017, 11:37    Post subject:  

fredx181 wrote:
The MBR needs to be installed also, otherwise it won't boot.

Exactly. All GRUB bootloader variants have two parts. Stage1 is the boot code written into the Master Boot Record at the start of the drive. This can be done various ways - dd, bootlace.com, etc. It over-writes the standard MS-DOS boot code.

Stage2 is the set of auxiliary boot files. In Grub4Dos, that's grldr and menu.lst.

Lin'nWin had an alternative. It kept the MS-DOS boot code, but modified the Windows "stage2" configuration to load grldr.

If your flash drive already has the Grub4Dos stage1 on its MBR from a previous setup, then you can get it to boot from a Debian setup, if you provide grldr. If the drive still contains the MS-DOS code in its MBR, it won't boot.
Back to top
View user's profile Send private message 
mcewanw

Joined: 16 Aug 2007
Posts: 3199

PostPosted: Sun 18 Jun 2017, 10:37    Post subject:  

Note to forum moderator.

This thread should remain unlocked since it is the main HowTo resource for the DebianDog/XenialDog projects and is incomplete awaiting new additions.

As far as Toni's (saintless) request to delete his account on Puppy Linux: Clearly Toni is under stress and it would be completely unfair and wrong and ridiculous to delete the Puppy login account of the main creator of the original DebianDog project at this time. It would frankly be disgraceful for any forum moderator to do that (in the Dog world that would be like deleting the login account of BarryK).

William
Back to top
View user's profile Send private message Visit poster's website 
backi

Joined: 27 Feb 2011
Posts: 1563
Location: GERMANY

PostPosted: Sun 18 Jun 2017, 11:02    Post subject:  

Hi mcewanw !

Quote:
Clearly Toni is under stress and it would be completely unfair and wrong and ridiculous to delete the Puppy login account of the main creator of the original DebianDog project at this time. It would frankly be disgraceful for any forum moderator to do that (in the Dog world that would be like deleting the login account of BarryK)


I am glad about your wise interference ( send from heaven? ) once more......so i will hereby join your request/petition .

Greetings !

Last edited by backi on Sun 18 Jun 2017, 11:14; edited 1 time in total
Back to top
View user's profile Send private message 
fredx181


Joined: 11 Dec 2013
Posts: 3485
Location: holland

PostPosted: Sun 18 Jun 2017, 11:12    Post subject:  

Quote:
Note to forum moderator.

This thread should remain unlocked since it is the main HowTo resource for the DebianDog/XenialDog projects and is incomplete awaiting new additions.

As far as Toni's (saintless) request to delete his account on Puppy Linux: Clearly Toni is under stress and it would be completely unfair and wrong and ridiculous to delete the Puppy login account of the main creator of the original DebianDog project at this time. It would frankly be disgraceful for any forum moderator to do that (in the Dog world that would be like deleting the login account of BarryK).

William


+1

Fred

_________________
Dog Linux website
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 6 of 10 [146 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » HOWTO ( Solutions )
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.1132s ][ Queries: 12 (0.0302s) ][ GZIP on ]