Make Slax USB on Ubuntu

written by Tomas M. 6 years ago

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.

Tomas M.

(c) 2019, Tomas M; rss