08

January
2013

Make Slax USB on Ubuntu

At first I have to say that I really like Ubuntu. No I don't, I'm lying. The reason why I stick with Slackware is the fact that things are actually working as one would really expect, every time the same, not like on the others *buntu based crappy systems. Sorry for the rude words, it made me feel much happier now :)

So where is the problem? On Slackware, you can use echo -ne 'some\ntext' and the output gets rendered on two lines, one line containing word 'some' and the other line containing word 'text'. This is what one would expect to happen. And that happens all the time, even if you run this command in a subshell. Not on ubuntu or other distros based on the same base. You may guess what the command actually echoes. No, it is not some\ntext. It's surprisingly this:

-ne
some
text

What the f**k?!

I am not even slightly able to understand why that happens, maybe it is even my fault to expect something else to happen, I don't know. The most important thing is that due to this behavior (unexpected for me) the bootinst.sh installer wasn't able to make a properly working Slax USB stick on Ubuntu and others, since I was using the above mentioned construct to echo some characters at the standard input of fdisk, to make Slax partition bootable, which didn't work since it received different text than I wanted.

Anyway, to keep better compatibility with the 'other' distros (read: ubuntu), I'll simply use multiple echo commands, to make sure that fdisk understands what are we trying to tell it:

echo a
echo b
echo c

This change will be included in Slax 7.0.4. Thanks to Jerzy Glowacki for spotting that the problem is in boot flag, which allowed me to find out what's really happening there.

User comments
Stummi 2013-01-08 04:28

you should prefer printf over echo. printf is better described in the posix standard and so more compatible between various posix-sytems

Martin 2013-01-08 04:48

On my Ubuntu 12.04 echo behaves normally in both terminal and graphical emulator. I remember I had some problems ("Missing operating system") when I installed Slax 7.0 first few times, but my next installations of all 7.x versions were fine. Unfortunately I don't remember how did I solve the problem; if I failed, or Ubuntu did.

softy 2013-01-08 04:57

will 7.0.4 have makeiso.sh
or some alternate zip file will be available to download and use it some how

Thank you

pistal 2013-01-08 05:40

I really surprised. What says man echo in ubuntu?

edgar 2013-01-08 05:53

This happens if /bin/sh is a symlink to dash and not to bash. If your skript starts with #!/bin/bash everything should be fine.
https://bugs.launchpad.net/ubuntu/+source/dash/+bug/72167

Tomas M 2013-01-08 06:10

@softy: I will put makeiso.sh to /slax/boot/ in 7.0.4

Tomas M 2013-01-08 06:12

@edgar: thank you for explaining!

M 2013-01-08 15:24

Anyone tried to use Linux live kit to make a liveOS out of Ubuntu?

And if Slackware is the favourite, why not use Salix with Mate (gnome2 fork) since kde4 is such a pain.

Tomas, is your Slax 'mount' command a soft link to busybox?

Danke.

Wizard57M 2013-01-08 18:15

Danke,
I use Salix KDE 13.37, have had no problems with KDE, and
there are parts of KDE I find quite handy (KOffice, KDEPIM)
and some of these I think would be nice in Slax 7. The only
problem I had with Salix, and which I've not had with Slax,
is the noeveau drivers on my nVidia graphics on my Dell
Inspiron desktop. I used a cheatcode to bypass those drivers and Salix KDE works well. With Slax, my video has been detected without manual intervention (Slax 6.1.2, and 7).
The other advantage I think of Slax is the download size,
only about 30 percent of Salix typical size.
Both are good though...I prefer Slax, especially since it
automatically gives you root, and mounts all drives.
Anybody up to writing a buildscript for KOffice or KDEPIM?

Addy 2013-01-08 22:49

Can someone help to add correct Slax 7 entry to a menu.lst file? Many thanks.

Prcek 2013-01-08 23:56

If you have old (not version 2) GRUB:
title Slax
root (hd0,0)
kernel /slax/boot/vmlinuz
initrd /slax/boot/initrfs.img

Of course you have to modify it if you have files on different partition than (hd0,0).

Addy 2013-01-09 00:26

I use Hiren's boot cd on a laptop without a HDD (Sorry, but I need Windows for work :) ). So I think I'm using grub4dos (little Linux experience, please bear with me). I added this lines in menu.lst:

title Slax 7.0.3 Romanian.
find --set-root /HBCD/Slax/boot/isolinux.bin
kernel /HBCD/Slax/boot/vmlinuz
initrd /HBCD/Slax/boot/initrfs.img

I'm getting stucked at "Looking for Slax data in /Slax". I would really like having Slax on the same USB flash with the Windows crap. What am I doing wrong?

jcsoh 2013-01-09 00:36

Try adding to the kernel line

kernel /HBCD/Slax/boot/vmlinuz from=/HBCD
or
kernel /HBCD/Slax/boot/vmlinuz from=/HBCD/slax

The first should work

Addy 2013-01-09 01:13

Ok, the 2nd line really helped, thanks, but now Slax does not enter the KDE desktop, it remains slax login in shell. Now what?

jcsoh 2013-01-09 01:39

Thats because it's still incomplete.

You need to set the slax flag which will varies with what you want.

kernel /HBCD/Slax/boot/vmlinuz from=/HBCD/slax <add here on the same kernel line

slax.flags=xmode,perch,toram

I am adding all 3 options , each separated by a comma
Omit whatever you don't want

xmode = auto login
perch = persistent -slax will save changes made
toram = copy bundles to ram , faster , need more ram , slower startup

To understand better look at your slax iso or tar in /boot
Use a text editor to open syslinux.cfg
See slax's boot up menu.

Mark De Silva 2013-01-09 02:27

Wizard, I believe the word "danke" is German for "thanks".

M, the nice part of Salix is its apparent availability of Mate the gnome 2 fork and ALSO more importantly, the package management that comes with dependency checking and installation. Its often referred to unofficially as the "ubuntu of slackware" - many of the slackware folk consider that terminology an insult for obvious reasons.

I like Salix for learners who will (hopefully) progress to Slackware proper, but the only thing I dislike about the whole thing is the inability to login as root to the desktop. They take the same irritating stand as ubuntu does on root logins with absolutely no regard for users who want to run their systems _their_own_ way.

So far all my attempts to get Salix mate (using gdm) to allow root logins have failed. I'm not sure what I was missing, but I gave up and wiped the machine. I did try their recent xfce live version based on Slackware 14.0 and I'm waiting for their mate version based on Slackware 14 (hopefully ready soon).

On using linux live kit to make a live unbuntu, no I haven't tried it. I tried using linux live scripts (old version of live kit) to make a live distro from ubuntu, but there were a couple of snags that I couldn't work out. There was a guide on the web for the very old version of live scripts (that made .mo modules) to make a live OS out of ubuntu 8.04 (I think) but I never got round to finding that article again.

Addy 2013-01-09 03:10

@jcsoh

Thank you very much, all is perfect now, Slax runs and rules.

Many thanks to you and the developer.

jcsoh 2013-01-09 03:24

"On using linux live kit to make a live unbuntu, "
Ubuntu is "big" on "user friendliness" , so not surprising they won't miss out on such option or if there isn't any third party software:-
https://help.ubuntu.com/community/LiveCDCustomization

Mark De Silva 2013-01-09 05:23

@JCSoh,

That method they've outlined involves creating one huge squashfs file with the entire file system. I've done it before with 8.04 and it was alright, but after using slax, I wanted the modularity option. I think what M was referring to was using linux live script/kit to create a ubuntu live distro as a modular distro like slax with the activate/deactivate etc.

jcsoh 2013-01-09 06:07

"one huge squashfs " I assumed this is the Ubuntu way . I think you see a giant casper file or something.

Same thing with Knoppix iso . It's one giant file (In Knoppix case it's not to bad as they practically include everything and very often more that one choice for each type of application). (I mean even cad and project management software is included).

In Ubuntu case , to them the livecd is only for preview /installation). They don't expect you to install and run in frugal mode.

Mark De Silva 2013-01-09 06:27

Yup, its the ubuntu way - as you probably have seen, they have persistent modes as well, so you can use it as a liveOS.

We used Knoppix initially but the non-modularity of the whole thing was a big put off and when Slax presented itself, I jumped onto the band wagon.

On a separate note, I've been looking at the Cinnamon desktop (http://cinnamon.linuxmint.com/) - I think it would be awesome with Slax. Not sure how heavy it is, but it sure feels super light.

A. KADALKA 2013-01-09 10:20

@Tomas M

ubuntu is a nice distro. It's just that you don't know how to use it, I suppose.
However I do NOT like ubuntu.

I'd prefer debian, arch or slackware...

When it comes to linux, I tend to use Linux Mint (debian AND ubuntu) because it's more convenient for people NEEDS, NOT because it is that good...
There are some glitches in Linux Mint (nobody is perfect)...

@MarkDS
Yep, Knoppix is better than ubuntu...
I dislikes the non-modularity of knoppix/ubuntu but it is because in those old ages no serious AUFS did exist, I think.
However, I've seen some slight bugs with the modular thing but I haven't tested it seriously until today.
In another word, big squashfs-like files will stay for a long time...

Cinnamon: It is light but needs gnome 3 may be...
In my point of view, gnome 3 is a good thing, but it should be WITH cinnamon or something like that.
I would like someone creating a Gnome 3 with cinnamon in a slackwarebased live distro.
Thats sounds interesting :P

A. KADALKA 2013-01-09 10:27

@jcsoh

Ubuntu is not hard to tweak...
My Linux Mint is not the original one: it is a better one I've customized...
Simple as one two three.

If it was too hard then you should not see so many ubuntu-like software...

I've even created a script so I could focus on the software to put into the distro and not in the fact that most guys do not know how to handle the squashfs and ISO creation...

Iguleder 2013-01-09 10:38

This problem is very common: it happens when one uses "echo" (which is the shell's built-in echo, that accepts no arguments).

Use /bin/echo (explicitly!) and the problem will be gone - this one actually does teh getopt.

A. KADALKA 2013-01-09 10:43

@MarkDS

--- "I dislike about the whole thing is the inability to login as root to the desktop. They take the same irritating stand as ubuntu does on root logins with absolutely no regard for users who want to run their systems _their_own_ way"

I agree with what you said.
They tought that some people or should I say, most people, do not know how to handle with Linux as root so they decided to forbid the root thing.

Sometimes I run a desktop as root, however it is NOT needed...

I've read somewhere in this page that some people are happy that slax is able to mount everything as root...
A good distro NEVER mount everything UNLESS it is asked because many people do use NTFS file system and I do not recommend that someone mounts it unless they need it...

I do mount EVERYTHING and I am NOT root... :-)
(Linux Mint, Porteus, Arch based live system, etc.)

Alung Pan 2013-01-09 16:38

i change it "flag-ROC" to Taiwanesee flag (R.O.T.)Republic of Taiwan Newborn state(country), because we are Taiwanese, not Chi-nese and Chi-na.
We are made in Taiwan, reject "made in Chi-na"
how to do? change it
follow this:http://api.ning.com/files/64N73u1ODCRmF8-4I8Z4KfMmHX3rYrDQj-iY449xNQ8cJsGE7mMDAYz5KwhsxT1lw7kNf*pXAbKsVQ86LcJWF2hLKc4xvd9a/389.jpg
thanks

Tomas M 2013-01-09 20:26

@Alung Pan: I don't fully understand what are you suggesting. Slax doesn't support taiwanese. Slax supports only Chinese traditional and Chinese simplified. Do you suggest to use Taiwanese flag for "Chinese Traditional" language?

jcsoh 2013-01-09 23:58

@ Tomas M

Don't you recall ? I recalled someone already complain about the Taiwan ?China flag issue .
From what I gather Chinese Traditional = Taiwan
Chinese Simplified = China
But better wait for the "chinese" to reconfirm.

@ Alung Pan 2013-01-09 16:38
You should keep politic out.
We are made in Taiwan, reject "made in Chi-na" -," Sure or not !"
Turn over computers , laptops , ipads etc , you are likely to see "made in china"
Of course "Taiwan" chips are inside hidden from view..

Tomas M 2013-01-10 03:19

@jcosh: I was in touch with one person from Taiwan and he told me that the flags for Chinese traditional and Chinese simplified shouldn't be the same, and he suggested the flags which are used NOW. So I'm confused now since some other person suggests yet another flag for Chinese Traditional...

jcsoh 2013-01-10 05:52

@ Tomas
In this case I think political interference have to play. As we all know China and Taiwan fought a civil war and once fought politically to be known as "the China".

This is from wikipedia (not that it 100% accurate".
http://en.wikipedia.org/wiki/Simplified_Chinese_characters

From wikipedia
"Simplified Chinese characters (simplified Chinese: 简体字; traditional Chinese: 簡體字; Pinyin: Jiǎntǐzì) are standardized Chinese characters prescribed in the Xiandai Hanyu Tongyong Zibiao (List of Commonly Used Characters in Modern Chinese) for use in mainland China"

Ok from the above , we got:-
(a) Simplified chinese (meaning the nos. of strokes is reduced).
(b) Traditional chines (before the nos. of strokes is reduced)
(c) Pinyin (we can ignore this .It's usimg a,b,c,d to spell out the chinese character sound (just like "soh" is written for my name (I am a chinese).

From wikipedia
"Along with traditional Chinese characters, it is one of the two standard character sets of the contemporary Chinese written language. The government of the People's Republic of China in mainland China has promoted them for use in printing since the 1950s and 1960s in an attempt to increase literacy.[1] They are officially used in the People's Republic of China and Singapore."

Ok from the above:
They are officially used in the People's Republic of China and Singapore."

The purposed on simplified chines /reduced strokes is to make it easier to learn how to write chinese (bear in mind they need to memorised the nos of strokes and characters).
m wikipedia
Fro
"Traditional Chinese characters are currently used in Hong Kong, Macau, and Republic of China (Taiwan). Overseas Chinese communities generally use traditional characters, but simplified characters are often used among mainland Chinese immigrants."

If wikipedia is correct ,
Simplified chinese should use China (as in mainland china) flag.
Traditional chinese should use Taiwan flag (note Taiwan still claim the name of ( Republic of China (Taiwan).)

As I said two countries fought a civil war , one side was defeated and withdraw to an island (Taiwan) , and when it clear they can no longer win over the larger mainland (mainland china) (after and is still today insisting they are the real "China" ) , declared they are a "separate country".

Jcsoh 2013-01-10 06:05

From : World Flag Database
http://www.flags.net/

Taiwan (Republic of China)
Flag:http://www.flags.net/TAIW.htm#nogo
Capital City: Taipei

China (People’s Republic of China)
Flag: http://www.flags.net/CHIN.htm
Capital City: Beijing

Jcsoh 2013-01-10 06:12

@ Tomas
If political interference comes into play (you never be sure who is posting whether from China or Taiwan) , it's better to just Google and see third part y.
source

Or make offence to both sides . Put Singapore flag on both. She the only chinese majority country outside Taiwan and China . (Hong Kong and Macau don't count as they have reverted back to China)(no doubt with special province status).

Tomas M 2013-01-10 08:58

I think I will keep the flags as they are now, since I am very confused by all of this :)

jcsoh 2013-01-10 13:22

I think you should . I believe it is correct.
The green /white flag shown by alun-pan's link is totally different to the red theme.

Mark De Silva 2013-01-10 21:43

I agree - just leave the flags. I don't see a significant difference (other than purely political or pride) to needing the flags changed about. Should actually do away with the flags and just have a plain background with words, (US-ENG, UK-ENG, T-CN, S-CN, etc) just like how the different language files are named.

Stummi 2013-01-14 23:07

printing "-ne foo bar" on "echo -ne foo bar" is exatly the bahivor defined by POSIX. So every posix-compatible shell like dash (which is used on debian and ubuntu for interpreting #!/bin/sh scripts) or bash-in-sh-mode will do this. And its NOT wrong

Tomas M 2013-01-15 06:41

@Stummi: actually nobody claims it to be wrong. It was just very unexpected for me, I incorrectly assumed that every distro uses bash as default shell.