LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Slackware Live USB (https://www.linuxquestions.org/questions/slackware-14/slackware-live-usb-946396/)

Juxjax 05-22-2012 11:17 PM

Slackware Live USB
 
I know there are several Slackware-based distributions that have been created for the purpose of acting as a live USB, but has any created an actual live USB from a full-blown Slackware itself? Any advice on how to do it?

Is there a way to install Slackware on a live USB just like we do on a hard drive with all the customizations, i.e. LVM, custom packages, applications, etc.?

Mark Pettit 05-23-2012 03:39 AM

Nothing would please me more than to see a "solved" answer to this question :-)

Well - OK - if someone transfers $$$millions into my bank account I'd be more pleased !

cmk77 05-23-2012 04:15 AM

Apparently porteus answered that.

ruario 05-23-2012 05:14 AM

Didier Spaier has previously written about how to install Slackware to an external USB disk. The only thing in addition you might want to do is to cut down the number of packages to get it to fit, if you are using a small disk like a pen drive. Though you can get a basic Xfce desktop setup within a couple of Gb.

Darth Vader 05-23-2012 06:06 AM

I believe that more interesting will be an official "out-of-box" USB installation kit. We remember, today slackware-current source tree generate (via AlienBOB's mirror-slackware-current.sh) a "little" ISO, about 5571MB.

Why I should use an Double-Layer DVD when already I have an 8GB USB stick?

I known, there is some (un)official methods, but, I believe to be better a solution to create an USB installer even using Windows as host. Something like what GParted do. Extract the source tree in the target device and run one script to make it bootable.

ruario 05-23-2012 07:07 AM

@Darth Vader: USB install images are already provided:

http://ftp.uninett.no/linux/slackwar...xe-installers/


Quote:

Originally Posted by README_USB.TXT
The 'usbboot.img' file is a 25 MB small USB boot image that you can
use to boot into the Slackware setup program. The mini image does not
contain any installable Slackware package. In order to install Slackware
you will need a local NFS/HTTP/FTP server or another Slackware package
source like a prepared local harddisk partition. This small image file
works great, especially when you can't or don't want to use CDROM media
as the carrier for the Slackware packages.
The image is transfered to a USB stick in a matter of seconds. Even the
oldest and tiniest of USB drives is well suited for this purpose.

You will also find usbimg2disk.sh in that directory. It allows you to make a disk that better uses the available space. So you can include the packages on the same disk if you don't want to do a network install.

ottavio 05-23-2012 09:04 AM

Quote:

Originally Posted by ruario (Post 4685540)
@Darth Vader: USB install images are already provided:

http://ftp.uninett.no/linux/slackwar...xe-installers/

I believe he meant something more like the ARM miniroot:
ftp://ftp.armedslack.org/armedslack/...tfs/README.txt

Juxjax 05-23-2012 10:52 AM

Thank you everyone. Certainly, there are many attempts and proposals offered, but I haven't seen a one that literally takes the hard drive installation and slaps it on to the live USB. I would surely give Didier's instruction a try this weekend.

Nevertheless, since I had envisioned the live USB to be functional on the majority of systems, namely taking it from laptop to laptop, or even desktop to desktop, the kernel configurations must be somewhat more inclusive to handle various hardwares and modules, which unfortunately, would make it bloated.

I'm not aiming to load an infinite number of packages and applications; as a matter of fact, when it comes to to user/server programs, I tend to be minimalistic.

Moreover, I think one should also consider how the normal excessive "writes" to the USB done by the programs and kernel would effect the longevity of the device. On the other hand, I wouldn't mind using it only for 2 or 3 years and replacing it with a better performing USB afterwards.

TobiSGD 05-23-2012 11:10 AM

What hinders you to just make a normal Slackware installation to that device?
Of course you have to adapt /etc/fstab and your lilo configuration to use labels or UUIDs, but that is a no brainer.

Hannes Worst 05-23-2012 11:35 AM

I dont't know if Exton-Slack has everything you need?

NyteOwl 05-23-2012 11:42 AM

You might like to check these out:

http://alien.slackbook.org/blog/inst...b-thumb-drive/

http://www.slackwiki.com/Install_Sla...SB_Flash_Drive

https://www.linuxquestions.org/quest...-slack-740557/

Mark Pettit 05-23-2012 12:21 PM

Quote:

Originally Posted by Hannes Worst (Post 4685711)
I dont't know if Exton-Slack has everything you need?

That looks very nice. I'm going to try a download this weekend. Thank you.

ottavio 05-24-2012 06:27 PM

I'm currently running Slackware 32 bit entirely from a 1G USB memory stick (yes, only 1 G !). I did a minimal installation and added packages one by one (a painful process). I have formatted the usb stick as ext2 to minimize writes, I have mounted some directories and files in ram:
Code:

bash-4.2$ cat /etc/fstab
/dev/sdb1        /                ext2        defaults,noatime 1  1
#/dev/cdrom      /mnt/cdrom      auto        noauto,owner,ro  0  0
#/dev/fd0        /mnt/floppy      auto        noauto,owner    0  0
devpts          /dev/pts        devpts      gid=5,mode=620  0  0
proc            /proc            proc        defaults        0  0
tmpfs            /dev/shm        tmpfs      defaults        0  0
tmpfs      /tmp        tmpfs  defaults,noatime,mode=1777    0  0

I have moved slackpkg cache files to /dev/shm amd modified Firefox to run entirely in memory.
This is the list of my packages:
http://pastebin.com/KatzBJ2m

Juxjax 05-25-2012 06:32 PM

Quote:

Originally Posted by TobiSGD (Post 4685698)
What hinders you to just make a normal Slackware installation to that device?
Of course you have to adapt /etc/fstab and your lilo configuration to use labels or UUIDs, but that is a no brainer.

The reason I'm trying to have a Slackware USB Live is because this is a laptop that I do not have a permission to install another OS on its hard drive. Moreover, I would like to have a flexibility to just take this USB Live, and if the system provide a bootable option from the USB, and load it on most machines. I understand that reconfiguration for a new system might somehow defeat this purpose, but I could install as many functionalities into the kernel or load them as modules with this USB Live.

Juxjax 05-25-2012 06:33 PM

Alien's Windows and Linux installation to the USB scripts are sure useful here. Thank you.

I'm going to try both of them this weekend see if I can get it to work.

Juxjax 05-25-2012 06:42 PM

Quote:

Originally Posted by ottavio (Post 4686838)
I'm currently running Slackware 32 bit entirely from a 1G USB memory stick (yes, only 1 G !). I did a minimal installation and added packages one by one (a painful process). I have formatted the usb stick as ext2 to minimize writes, I have mounted some directories and files in ram:
Code:

bash-4.2$ cat /etc/fstab
/dev/sdb1        /                ext2        defaults,noatime 1  1
#/dev/cdrom      /mnt/cdrom      auto        noauto,owner,ro  0  0
#/dev/fd0        /mnt/floppy      auto        noauto,owner    0  0
devpts          /dev/pts        devpts      gid=5,mode=620  0  0
proc            /proc            proc        defaults        0  0
tmpfs            /dev/shm        tmpfs      defaults        0  0
tmpfs      /tmp        tmpfs  defaults,noatime,mode=1777    0  0

I have moved slackpkg cache files to /dev/shm amd modified Firefox to run entirely in memory.
This is the list of my packages:
http://pastebin.com/KatzBJ2m

Did you create LVM on the USB first and ran your installation? By the way, you did not mention how you got it to work in the first place. Did you just simply follow the Alien's scripts mentioned above?

If you want to dedicate a portion of your USB to the FAT32 partition, so you can dump certain "shared" files into that partition for use in Windows, do you have to place it at the beginning of the USB?

I like the idea that you have been proactive in minimizing the writes to the device itself, i.e. Firefox, but I don't understand why it is necessary to fiddle with slackpkg cache files! I mean, do they get modified often to the point that you had to actually move them to a shared memory device?

Thank you for sharing the list of installed packages. I too normally go down that daunting task of installing packages one by one which usually ends up causing headaches when some applications break due to the lack of presence of dependencies. But then again, you learn a few things in between.

TobiSGD 05-25-2012 07:25 PM

Quote:

Originally Posted by Juxjax (Post 4687789)
The reason I'm trying to have a Slackware USB Live is because this is a laptop that I do not have a permission to install another OS on its hard drive. Moreover, I would like to have a flexibility to just take this USB Live, and if the system provide a bootable option from the USB, and load it on most machines. I understand that reconfiguration for a new system might somehow defeat this purpose, but I could install as many functionalities into the kernel or load them as modules with this USB Live.

Actually, you will be able to do that with a normal install on USB, as long as you don't use proprietary drivers for the graphics card. No need for a Live system. In fact, it is easier to adapt the system to a new machine when you have a normal install instead of a live one.

Juxjax 05-25-2012 10:43 PM

Quote:

Originally Posted by TobiSGD (Post 4687816)
Actually, you will be able to do that with a normal install on USB, as long as you don't use proprietary drivers for the graphics card. No need for a Live system. In fact, it is easier to adapt the system to a new machine when you have a normal install instead of a live one.

Very well, how can I go about installing a normal version on the USB where I can augment or remove applications as needed? Note, that I tend to have a minimum amount of packages (of course a light weight windows manager like Fluxbox would be more than enough).

P.S. Has anyone used LVM to perform their partitioning on the USB?

TobiSGD 05-25-2012 10:51 PM

Quote:

Originally Posted by Juxjax (Post 4687901)
Very well, how can I go about installing a normal version on the USB where I can augment or remove applications as needed? Note, that I tend to have a minimum amount of packages (of course a light weight windows manager like Fluxbox would be more than enough).

Just do it the same way you would do it when installing on an internal harddisk, just chose the partitions on your USB and install Lilo to the USB's MBR. Nothing difficult or magic about it. I would recommend to give your partitions labels when formatting (or do that afterwards with tune2fs) and then adapt your lilo.conf and fstab for using those labels, so that the install will work on different machines without mixing up partitions.

Juxjax 05-26-2012 08:30 AM

Quote:

Originally Posted by TobiSGD (Post 4687904)
Just do it the same way you would do it when installing on an internal harddisk, just chose the partitions on your USB and install Lilo to the USB's MBR. Nothing difficult or magic about it. I would recommend to give your partitions labels when formatting (or do that afterwards with tune2fs) and then adapt your lilo.conf and fstab for using those labels, so that the install will work on different machines without mixing up partitions.

Very well. I can give that a try.

But let me also ask, what is the main reason for people creating a live USB vs. normal? Is it because the former requires less write hits on the USB which increases the longevity of the drive? Would be advisable to compile kernels on a normal USB installation?

TobiSGD 05-26-2012 10:43 AM

Quote:

Originally Posted by Juxjax (Post 4688104)
Very well. I can give that a try.

But let me also ask, what is the main reason for people creating a live USB vs. normal?

Actually I don't know. the only reason I can think of is that you have every time you boot your system in a predefined state, which is quite handy for a secure system for online banking, for example.

Quote:

Is it because the former requires less write hits on the USB which increases the longevity of the drive?
Possibly, but with the prices USB devices have nowadays I personally wouldn't call that a factor.

Quote:

Would be advisable to compile kernels on a normal USB installation?
Same as above, but with todays machines with 4GB and more it shouldn't be a problem to do that in RAM (which I always do).

Juxjax 05-26-2012 01:36 PM

Quote:

Originally Posted by TobiSGD (Post 4688185)
Actually I don't know. the only reason I can think of is that you have every time you boot your system in a predefined state, which is quite handy for a secure system for online banking, for example.

Possibly, but with the prices USB devices have nowadays I personally wouldn't call that a factor.

Same as above, but with todays machines with 4GB and more it shouldn't be a problem to do that in RAM (which I always do).

Hmm... then I guess, in my case at least, there is little reason to go down the live route. I think with Moore's law in case of USB's, I am not banking on using a single stick for more than 2 or 3 years.

I'll give this whole thing a try this evening.

jrosevear 06-24-2012 01:33 PM

I can help
 
Quote:

Originally Posted by Juxjax (Post 4685310)
I know there are several Slackware-based distributions that have been created for the purpose of acting as a live USB, but has any created an actual live USB from a full-blown Slackware itself? Any advice on how to do it?

Is there a way to install Slackware on a live USB just like we do on a hard drive with all the customizations, i.e. LVM, custom packages, applications, etc.?

Some posts on this thread have pointed out that this is not a mystery, rather it is quite do-able. There are however lots of variations on how to do it, and that adds some confusion.

I have a way to do it. I call it Joe's Boot Disk (JBD). You can get it from SourceForge at http://sourceforge.net/projects/joesbootdisk/

You can read about how it works at http://rosevearsoftware.com/products/jbd/

A JBD contains a Slackware kernel and sufficient libraries and modules to boot an (almost) ordinary Slackware installation on an internal or USB device.

I say "almost ordinary", because you need to use labels on the relevant partitions of the device you are booting and refer to those labels in the /etc/fstab. This is done with "LABEL=<label>" syntax instead of "/dev/<device>".

The JBD must meet your needs or it won't work. If you find a JBD that has a suitable kernel and file system type, then you can adopt the label that it uses.

Alternately, you can make your own JBD with the information and files I provide on my rosevear software website. Sadly, this isn't easy. I'm working on a newer method to address that lack.

-Joe

BlackRider 06-24-2012 06:45 PM

Quote:

But let me also ask, what is the main reason for people creating a live USB vs. normal?
First, a Live device allows you to boot always in a predefined environment. This means the Operating System does not degrade with use, nor do user misconfigurations survive reboot.

Secondly, a Live OS, when properly configured, does not leak data to the hard drive. This is important when dealing with security or critical information in a computer which is not secure (for example, you fear the inner drive could be seized by enemy forensics after you use it, thus allowing them to retrieve data). With a Live system, you can carry an encrypted drive and the Live OS, knowing you can boot, operate the encrypted drive and shutdown leaving no traces on the insecure inner drive.

Third, in most cases, making backups of the Live system gets extremely simplified.

Forth, if you have to deal with multiple "stupid" users that need to use a homemade appliance (whatever), and you need to distribute a consistent system for them, it is safe to distribute live media. Just make a remastered Live OS for them and distribute copies to them. No matter how stupid the users are, they won't easily break the system so badly that a reboot won't fix it. I found myself in the need to turn some laptops with a broken Windowses into multimedia playing centers, and I solved the issue remastering a Knoppix CD and installing a "frugal" Knoppix on the laptops.

Fifth, most live media uses compression technologies, so you can squeeze more software in them than in a usual install. Knoppix DVD, when uncompressed, makes for 9Gb or so.

I suppose there are more good reasons, but I don't want to think much more :-)

jefro 06-24-2012 08:40 PM

Live usb tend to mean created from a live cd. The live cd was adapted to run on a usb by some different tricks. The main part is still tends to be a compressed virtual filesystem where a lot of data might be stored in order to save space on a cd.

Since the usb drives and internal drives have changed over from the ide to the scsi we have always had the ability to install to a usb. What was needed was only two parts. One was a way to use the usb at boot and two was large enough flash drives. In the last maybe 5 years or so both have been available to use. A cheap 8G flash can be used to have almost any modern distro installed to it directly just as if it were a regular hard drive.

dwblas 06-25-2012 12:59 PM

Quote:

Originally Posted by cmk77 (Post 4685442)
Apparently porteus answered that.

I have never understood the "copy to a CD, boot from the CD, and install to usb". If it's on a CD, installing to a usb drive is redundant, and you have to burn a new CD on each upgrade which defeats part of the reason for using a usb flash drive, and you are limited to 700MB. So I'm also going the try the alien et al links. I have used UNetBootin to create a bootable live image. It works fine. There is no Slackware option, so you have to download the Slackware ISO and point it there. I always prefer a "Slackware" solution though.

Edit: I just checked Slackbuilds.org and there is a slackbuild for unetbootin. It's version 565 though instead of the newest 575 so you will have to change the slackbuild if you want the newest version.

You can now find 32GB flash drives for under $20 US (2.0 not 3.0) so size limitations should not be a problem. Damn I'm windy today.

TobiSGD 06-25-2012 01:09 PM

Quote:

Originally Posted by dwblas (Post 4711516)
I have never understood the "copy to a CD, boot from the CD, and install to usb". If it's on a CD, installing to a usb drive is redundant, and you have to burn a new CD on each upgrade which defeats part of the reason for using a usb flash drive, and you are limited to 700KB. So I'm also going the try the alien et al links.

I wouldn't do it that way. I just would use the USB as a disk in Virtualbox. This way i don't have to burn disks. Also I can't see a limit to 700MB (I think you meant 700MB, not 700KB), at least not since the invention of the DVD.

jrosevear 07-01-2012 03:34 PM

Quote:

Originally Posted by jrosevear (Post 4710749)
The JBD must meet your needs or it won't work. If you find a JBD that has a suitable kernel and file system type, then you can adopt the label that it uses.

Alternately, you can make your own JBD with the information and files I provide on my rosevear software website. Sadly, this isn't easy. I'm working on a newer method to address that lack.

-Joe

To follow up...

I made and uploaded a new release. This release is a kit for making your own custom JBDs that boot Slackware 13.37.0. The kit includes a script that allows you to choose from two kernels and four file systems. It lets you specify any LABEL, and it burns the JBD for you on either CD-R or CD-RW media.

-Joe

danielxs 05-12-2014 12:55 AM

modifying slax
 
There is another solution in order to obtain a persistent kde slackware on an usb stick. You can simply modify an usb slax this way:
Using a slackware 14.1 live dvd, upgrade or install (upgradepkg --install-new nameofpkg.txz) in the slax usb system, the following packages, to be able to use slackbuilds:
GConf-3.2.6-i486-1.txz
autoconf-2.69-noarch-1.txz
automake-1.11.5-noarch-1.txz
bison-2.7-i486-1.txz
expat-2.1.0-i486-1.txz
flex-2.5.37-i486-1.txz
glade3-3.8.3-i486-1.txz
glib2-2.36.4-i486-1.txz
gobject-introspection-1.36.0-i486-1.txz
gperf-3.0.4-i486-1.txz
gtk+-1.2.10-i486-5.txz
gtk+2-2.24.20-i486-1.txz
gtk+3-3.8.2-i486-2.txz
harfbuzz-0.9.16-i486-1.txz
icu4c-51.2-i486-1.txz
intltool-0.50.2-i486-1.txz
libarchive-3.1.2-i486-1.txz
libcroco-0.6.8-i486-1.txz
libglade-2.6.4-i486-4.txz
libidn-1.25-i486-2.txz
libxml2-2.9.1-i486-1.txz
libxslt-1.1.28-i486-1.txz
nettle-2.7.1-i486-1.txz
openldap-client-2.4.31-i486-2.txz
pango-1.34.1-i486-1.txz
peazip-3.1-i686-1as.txz (this one is not in slackware dvd but ark will not work so....)
perl-Bit-Vector-7.3-i486-1dj.txz
perl-Sub-Uplevel-0.22-i486-2dj.txz
perl-extutils-pkgconfig-1.15-i486-1gv.txz
perl-gtk2-1.249-i486-1tjb.txz
perl-pango-1.224-i486-1tjb.txz
pil-1.1.7-i486-4.txz
pycairo-1.8.10-i486-2.txz
pygobject-2.28.6-i486-2.txz
pygtk-2.24.0-i486-1.txz
soprano-2.9.0-i486-1.txz
vlc-2.1.4-i486-1alien.txz (not in the slackware dvd...)
alsa-lib-1.0.27.2-i486-1.txz
alsa-utils-1.0.27.1-i486-1.txz
alsa-oss-1.0.25-i486-1.txz
autofs-5.0.7-i486-2.txz
automoc4-0.9.88-i486-1.txz
cmake-2.8.12-i486-1.txz
gccmakedep-1.0.2-noarch-2.txz
font-arabic-misc-1.0.3-noarch-1.txz
font-bh-lucidatypewriter-100dpi-1.0.3-noarch-1.txz
font-bh-lucidatypewriter-75dpi-1.0.3-noarch-1.txz
font-bh-ttf-1.0.3-noarch-1.txz
font-bitstream-type1-1.0.3-noarch-1.txz
font-util-1.3.0-i486-1.txz
font-xfree86-type1-1.0.4-noarch-1.txz
libXfont-1.4.6-i486-1.txz
mkfontdir-1.0.7-noarch-1.txz
mkfontscale-1.1.1-i486-1.txz
showfont-1.0.4-i486-1.txz
terminus-font-4.38-noarch-1.txz
xfontsel-1.0.5-i486-1.txz
xlsfonts-1.0.4-i486-1.txz
gcc-4.8.2-i486-1.txz gcc-go-4.8.2-i486-1.txz
gcc-g++-4.8.2-i486-1.txz gcc-java-4.8.2-i486-1.txz
gcc-gfortran-4.8.2-i486-1.txz gcc-objc-4.8.2-i486-1.txz
gcc-gnat-4.8.2-i486-1.txz gccmakedep-1.0.2-noarch-2.txz
gettext-tools-0.18.2.1-i486-2.txz
glibc-2.17-i486-7.txz glibc-solibs-2.17-i486-7.txz
glibc-i18n-2.17-i486-7.txz glibc-zoneinfo-2013d-noarch-7.txz
glibc-profile-2.17-i486-7.txz
gnu-efi-3.0s-i486-1.txz gnuplot-4.6.3-i486-1.txz
gnupg-1.4.15-i486-1.txz gnutls-3.1.16-i486-1.txz
gnupg2-2.0.22-i486-1.txz qca-gnupg-2.0.0_beta3-i486-1.txz
clucene-2.3.3.4-i486-2.txz kwebkitpart-1.3.2-i486-1.txz
kdewebdev-4.10.5-i486-1.txz
curl-7.31.0-i486-1.txz pycurl-7.19.0-i486-2.txz
dbus-python-1.2.0-i486-1.txz python-2.7.5-i486-1.txz
notify-python-0.1.1-i486-3.txz
m4-1.4.17-i486-1.txz xfwm4-4.10.1-i486-2.txz xfwm4-themes-4.10.0-i486-1.txz
perl-5.18.1-i486-1.txz perlkde-4.10.5-i486-1.txz perlqt-4.10.5-i486-1.txz
qca-2.0.2-i486-1.txz qca-gnupg-2.0.0_beta3-i486-1.txz
qca-cyrus-sasl-2.0.0_beta3-i486-1.txz qca-ossl-2.0.0_beta3-i486-2.txz
PyQt-4.9.6-i486-1.txz polkit-qt-1-0.103.0-i486-1.txz
kdevelop-pg-qt-1.0.0-i486-1.txz qt-4.8.5-i486-2.txz
libdbusmenu-qt-0.9.2-i486-2.txz qtscriptgenerator-0.2.0-i486-2.txz
perlqt-4.10.5-i486-1.txz smokeqt-4.10.5-i486-1.txz
sendmail-8.14.7-i486-1.txz sendmail-cf-8.14.7-noarch-1.txz
After that, just make a kde restore, becouse slax kde configuration it's not so good, and you'll have a great slackware 14.1 live usb. I've done that and it's working very nice.

Drakeo 11-21-2015 09:59 PM

Alien Bob resurrects a live slack
 
Only an Alien could come down to earth and give us some thing Live. Resurrection of a thread that had gone to pasture.
So. Check it out at Alien pastures I sent you a 12 pack of beer Eric. The pay pal way.
Great work Plasma5 live cd OMG.

kingbeowulf 11-27-2015 01:18 PM

Indeed. Eric's Official Live Slackware Beta works great so far, with only a few niggling bits to fix here and there. A very good start!

jon lee 11-27-2015 07:35 PM

I made one for my son who is into MIDI.
http://sourceforge.net/projects/slackjackstudiolinux/
The instructions are incorrect in that you need a 4G USB flash drive partition.
http://sourceforge.net/projects/slac...?source=navbar

He still uses it today, so I guess it was a success.
(I used aufs and linuxlive)
http://www.linux-live.org/

Drakeo 11-27-2015 08:35 PM

I love the slacklive plasma5 used it to install it on one of my partitions.
https://www.youtube.com/watch?v=Y2wL4W5Vzjs
you have partition manager ready you have squashfs ready. nvidia ready. just extracted it to a hard drive set my fstab pointed my grub.cfg to it. and wow startx I am happy. I should right a script that extract the squashfs to hard drive then right one to make the live. I am sure Eric did if not that would be a lot of manual labor.
send him a donation asap he needs the beer money his kitty is tired of milk.


All times are GMT -5. The time now is 07:48 AM.