Virtual machine on Windows 11 without admin

In my ongoing scheme to get as much functionality on Windows as a lack of admin access will give me, here is a path to installing a Linux VM, which you can administer fully, into Windows 11 in which you don’t have admin rights.

Downloaded the QEMU Windows 11 installer. I used wget, but a browser or whatever is fine:

wget https://qemu.weilnetz.de/w64/2023/qemu-w64-setup-20230822.exe

Unzipped the exe (right-clicked on the file, chose something like ‘open with 7zip’ or similar) — that seemed to work … copied all the content into some folder.

C:\Users\darren\installs\QEMU

Added this to the path for my account. Then  opened a regular CMD window (not admin window — I am not allowed too…). Went to the folder where I want the VM to live (created it first if need be):

cd C:\Users\darren\installs\slitaz

Made a disk — that is, created the drive for the VM:

qemu-img create -f qcow2 slitaz-image.img 20G

Formatting 'slitaz-image.img', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=21474836480 lazy_refcounts=off refcount_bits=16

Got the install media —  I have chosen SliTaz Linux because it is relatively low in system requirements, and installing in user space means some speed-ups that would otherwise be on offer (like hardware acceleration, that’s a buzzword that comes to mind) are not possible.

wget http://mirror.slitaz.org/iso/rolling/slitaz-rolling.iso

I suggest you view this page:

View at Medium.com

Boot with some instructions:

qemu-system-x86_64 -m 2048 -boot d -smp 2 -hda slitaz-image.img -cdrom slitaz-rolling.iso

What doe this mean?

-m 2048 = machine has 2 GB of RAM
-boot d = boot off the CD drive
-smp 2 = model a 2 processor machine
-hda slitaz-image.img = the hard disk to use
-cdrom slitaz-rolling.iso = what to put in the virtual CD drive

the Slitaz disc boots and we get the live disc desktop.

Some issues with mouse integration, let’s forget that for now. I can right-click in middle of GUI window and choose to launch application, and run xterm and then run tazpanel.

Then clicked on head and shoulders icon and became root; then chose Installation > Install SliTaZ from the panel top menu.

Ran GParted and made the partitions — all as per normal installation (a few GB of swap, and a root partition).

Filled out the details in the installer and off it went.

Note: SliTaz doe not like spaces in passwords. Make sure you install a bootloader — this will not be a shared disk, so that means I just chose the first option.

Reboot! That means shutdown the machine, then run it using a different QEMU command, because we don’t want to boot off the CD now.

qemu-system-x86_64 -m 2048 -boot c -smp 2 user -hda slitaz-image.img

In my case, I have not got -nic options in the boot command, because the defaults worked. From within the machine, I can ping 8.8.8.8, browse the web, and update SliTaz and install software.

Mouse is a bit flaky, and have to try a couple of times to boot it sometimes, but on the whole not bad. An admin-able machine inside a Windows machine that I am forbidden to admin!

‘kay

SliTaz Linux — responsive on very old hardware

SliTaz Linux is my preferred ‘Linux on old hardware’ solution. And I do mean old hardware. I mean single core, 400 MB RAM, year 2000 hardware.

SliTaz Linux (slitaz.org) is based on 3.X series Linux kernels, which has some disadvantages, but one major advantage — it is more compact, and well suited to quite old hardware. That means that the SliTaz live image is only about 50 MB(!) yet gives you Gparted, web access and a whole bunch of other tools. It runs very smoothly and responsively on very old hardware — for example, I am using a Compaq E500 with a Pentium III and 380-odd MB of RAM, and everything is fine.

The computer has a CD drive, not a DVD.

Some parameters from Hardinfo:

Pentium III Coppermine, 1 GHz (1 core)

381,240 KB RAM

It has an 80 GB IDE HDD, with FreeDOS installed on the front of the partition (that is, on /dev/sda1).

Here is the process of getting SliTaz installed and working well.

(1) Went to the website and downloaded the 4-in-1 iso file (32 bit, not 64). For example, http://distro.ibiblio.org/slitaz/iso/rolling/slitaz-rolling.iso.

(2) Burned it to a CD using another machine (this machine cannot read DVDs); for example, on Cygwin, where E is my CD drive:

$ wodim -v speed=4 dev=E: -data ./slitaz-rolling.iso

(3) Booted from the CD.

(4) Chose my keymap (en_GB).

(5) Booted into the live desktop.

(6) Applications > System tools > Gparted.

(7) Created a swap partition immediately after the FreeDOS one (ideally swap goes at the front of the disk, but I did not feel like complexifying things by moving partitions around), then a root partition (sda3) then a /home (sda4). The size of the root (/) partition really depends o how much software you plan to install. Noted the partition names for future reference.

(8) Applications > System tools > SliTaz installer

(9) Now, the installer is pretty easy to use, all you need to do it read each screen thoroughly. It has a field for nearly everything you need to do, so if you just fill them in, it works pretty well. For example, I put sda3 in a root partition, sda4 as /home, filled out user and password details, asked for the bootloader to be installed to the MBR, clicked Proceed and then let it go.

(10) Eject the CD and reboot.

(11) It booted no worries. It is slightly odd, because it flashes up a long boot menu full of generic entries that are not relevant, then launches a GRUB4DOS boot screen from which SliTaz actually boots; but it works fine.

(12) But FreeDOS did not appear on either boot menu. The simplest thing was to edit the /boot/grub/menu.lst file and add these lines to the bottom:

title FreeDOS1.3RC3
root (hd0,0)
chainloader /kernel.sys

This just sets the partition to boot (in GRUB language) and says what to load. Works!

An alternative may be to install GRUB2, but I did not do that. This entry affects the second of the 2 bootloader screens.

(13) Now it is a matter of customising the system, which mostly works through tazpanel. You can set your time zone and all that, and install software.

System administration is done most readily through tazpanel:

(Applications > System tools > SliTaz Panel). You can elevate it to root by clicking on the little head-and-shoulders icon on the top right, which means you can browse the settings and meddle with anything in userspace, and then elevate for serious admin; it is very simple, once you know the little trick.

That’s actually one of my comments about the whole SliTaz ystem; it can do a lot, but how is not always obvious. For example, to install the MS core fonts, you install a package called something like ‘get-msttffonts’ or something, then run that command from a root command line.

Also, all the package management tools can be done on the command line if you want, so while you can use the GUI for package updates — all with dependency resolution — you can do it from the command line if you prefer.

The range of software is somewhat limited compared to one of the big distributions, but given what it can do in such limited space, and how fast it runs on old hardware, I think SliTaz hits a pretty sweet spot.

(14) To instal TeX Live, I did not use any SliTaz packages, but went to the TeX Live website and downloaded their own tool:

install-tl-unx.tar.gz

which I unpacked in a scratch space and ran; I ran it as root, but I believe that is not essential.

I also had to manually create /usr/local (as root), as I recall.

(15) Web browsing — mostly, you can use Midori. It works with Gmail, AOL mail, the Outlook web interface, and so on. It does not let me edit WordPress, and cannot work with some other heavy sites. I can post to WordPress using its post-via-email feature, though – – as I am now.

I don’t have enough RAM to install a bigger browser, so that is one limitation I am going to live with. You may have more RAM; I can always install a mail client, like Alpine.

(16) Still to do: I have not got the frame buffer to work. I have found that on low-spec machines, sometimes booting into a non-X mode and working in the frame buffer console can save a lot of RAM and allow things to happen a lot faster. So that would be good, but is far from essential.

By using rclone, I can access any cloud storage providers that don’t work through Midori. A lighter choice of office software (like Abiword) gives me anything I need in that respect, and my favourite old terminal program — mrxvt — is provided in the latest, patched version, which is great.

I also got my Broadcom/Linksys b43 wpc54g legacy PCMCIA wireless card to work, so I am free of Ethernet cables.

Conclusion

SliTaz does a huge amount in a very small space, with very few resources,  and is pretty easy to use. I think it is amazing. I can (if I choose) now do real work on a laptop from the year 2000.

Some Linux distributions call themselves ‘light’ but still need over 1 GB of RAM. I guess by 2022 standards 1 GB is not much RAM. If you have genuinely old hardware (say, 20 years), and in this case a laptop, so not the fastest chip that was around 20 years ago either, then SliTaz is a very useful option. It is not as slim as Tiny Core, say, but it is (in my limited experience) easier to set up and administer, and can turn your old machine into (say) a VNC or X terminal, while also letting you use it directly to do some useful work via tools like Midori, Gnumeric,TeX Live and Abiword.

With less than 400 MB RAM, there are pieces of software that SliTaz offers that I am not going to install, but if you put SliTaz on a bigger machine, I have every reason to expect they would work. I am thinking of things like the GIMP.

You do need to do a few things yourself and solve a few problems by command line, but not often. If I was not dual booting, for example, the GRUB configuration would not have needed any editing.

2 thumbs up

Slight as!

Slackware 15 on an old, low-powered machine — Panic!!!

Short story:

Stack installed ok on this very old machine. It only has a CD drive, so I put the full contents of the install DVD onto an existing partition on the hard drive, then used the mini ISO to boot from CD and directed it to take the packaged from the  existing partition.

Singe core, old processor, was best to boot the huge kernel with the noefi flag.


Details

Computer is OLD — CD drive but not a DVD drive (laptop, so not easy to swap), and no USB boot option in the BIOS settings. So I can either network install after net boot, or I can boot off a CD (or in fact floppy(!)), then install from network, if the distro does not fit on a single CD.

First, I got the appropriate iso file:

http://www.slackware.com/~alien/slackboot/mini/15.0/
http://www.slackware.com/~alien/slackboot/mini/15.0/slackware_i586-15.0-mini-install.iso
wget https://slackware.nl/slackware/slackware-current-iso/slackware-current-mini-install.iso

(wget is good here)

Then seeing as I was using Windows, I burned it using Cygwin:

$ wodim -v speed=4 dev=E: -data ./slackware_i586-15.0-mini-install.iso

Installing on a Compaq E500. Have to boot from CD — too old for USB option.

Has FreeDOS on /dev/sda1, which I want to keep (it’s actually IDE, so it would have used to have been called /dev/hda1).

Boot from the CD and type huge.s then hit enter to boot huge.s kernel.

First I’ve deleted all partitions except the FreeDOS one (sda1), then put in swap (sda2) and / (sda3) and /home (/sda4).

Done using cfdisk

I cannot put the swap exactly at the front of the disk, but so be it.

Very simple.

Then save and exit and run setup.

addswap — finds it and formats it; no problems

then format / to ext4 — no problem there either

Mouting the FreeDOS install at boot time as /freedos — no worries.

chose to install from HTTP/FTP server, and put in:

https://mirror.aarnet.edu.au (or use its IP address)

I used the servers IP address (ie http://202.158.214.106)

for the server and

/pub/slackware/slackware-15.0/slackware

for the folder — note — 32 bit!

Then it downloaded some stuff and i decided to not install KDE, emacs and the y set (games). We’ll see if the old machine can handle XFCE, but I might end up using something simpler, like Openbox.

And we wait … [note — if you use the -current iso (instead of 15.0) (or some other version) make sure to point the installer at the correct set of files] … and a bunch of crucial packages do not install. I suspect the installer has not made enough space to download them, because an out of space error message flashes up. Smaller packages install, so it may relate to some scratch space size.

I tried putting the files on a USB or on the FreeDOS partition — machine cannot boot from USB, but can mount a file system, so I downloaded the full Slackware ISO for the installation DVD, then unpacked the ISO onto a USB stick (or onto the FreeDOS partition). But now I get a kernel panic and cannot even boot the install disk. SliTaZ boots, so I have not idea why the change.

Tried resetting the BIOS, tried whatever else I can think of, tried some kernel parameters — nothing. Reburned the CD — nothing. It is odd that it booted OK once  but not a second time…

Eventually I worked out I needed to pass noefi as a boot parameter. Then the installation went fine, after I mounted the partitions with the DVD contents on them. I did not install KDE packages, or games (machine only has 350 MB RAM).

As long as I use lightweight packages, Slackware is fine on this older hardware. It’s not so much about the OS itself as about what packages you choose to run.

 

Slack

 

Reinstalling GRUB on SliTaz

Well, the FreeDOS install that shares the disk with SliTaz went barmy, and on reinstall I toasted the MBR so can only boot FreeDOS. Stupid.

Not that hard to fix.

  1. Booted from the SliTaz 4-in-1 CD, same as the one used to install it
  2. Chose my keymap (UK)
  3. Let it boot
  4. Once I had the desktop, opened a terminal window and started a root session:
    $ su

    (the live disc uses ‘root’ as the root password)

  5. Mounted the root (/) partition of the SliTaz install on the HDD:
    # mount /dev/sda3 /mnt
  6. Now, at this point some instructions talk about mounting /proc and stuff and using chroot; this did not need anything so complicated (all the config files were still on /dev/sda3, just the bootloader in the MBR was missing) so first verified the version of GRUB:
    # grub-install --version
    grub (GNU GRUB 0.97)
  7. So you can see that SliTaz uses an older version of GRUB; this is important because the next command is different for versions after 1.98:
    # grub-install --root-directory=/mnt --no-floppy --recheck /dev/sda
  8. Did not throw any errors; great
  9. Rebooted and got a GRUB menu, then dropped through to a menu that allowed me to select FreeDOS or SliTaz
  10. Note: The menu for GRUB1 is in /boot/grub/menu.lst, and you add FreeDOS to it by adding this to the end of that file:
    title FreeDOS
    root (hd0,0)
    chainloader /kernel.sys

Now, this is GRUB instead of GRUB2, which most modern systems will have. GRUB2 would use --boot-directory=/mnt/boot (and has a much more complicated configuration file set up, because we all know that things have to get more complicated instead of remaining simple, because that’s how we can tell progress has happened) but I cannot tell you fort sure that would work, because it’s not what I did.

Caveats:

This approach only works if the software on the install CD matches that in the booted partition, because I am effectively running the install program version that is on the CD, not on the HDD that I am installing it to. I know that this is the exact same CD I installed SliTaz from, and that I never changed the SliTaz install to a different version of GRUB or to some other bootloader. If there are any mismatches, YMMVW (your mileage may vary wildly, up to and including s gyre of flames spewing into the sky).

Other procedures involve mounting the HDD file system and various system directories (like /dev, /proc, /sys and /run) then using chroot to make /mnt the new root of the system. This is the way you would most likely do it if you had GRUB2 installed on the HDD and wanted it to install itself fairly automatically — it would need to be run from the system on the HDD in question, because that meets the programs expectations. As I said, I dunno about installing GRUB2 without chrooting.

SLiTaz is perhaps not the most representative OS.

Note: I am saying HDD because SliTaz is in my case being used on a legacy system with a HDD. I don’t see why it would matter whether it is HDD or SSD.

An explanation

The partition I want to boot (/dev/sda3) is mounted to /mnt , and the live CD can see the drive that partition is on (/dev/sda). So the command tells the installer to write the initial boot stuff to the drive and any other stuff to the mounted file system. That it works is a pleasant surprise, and given how often I futz things up, something that I’ll probably have to use again some time.

 

cor

Installing Ubuntu Linux on a computer that already has Windows

First, I downloaded the mini ISO and burned it to a CD. They don’t seem to want you to install this way any more, but there is still a disc image — here: http://archive.ubuntu.com/ubuntu/dists/focal/main/installer-amd64/current/legacy-images/netboot/ (for now…)

  1. Burned it to CD.
  2. Downloaded and burned a SliTaz Linux live CD. Slitaz is great as a toolbox distribution. It comes with Gparted, for one thing, and is a very small download, for another. Put this CD into the computer’s drive.
  3. Turned on the Windows box and hit F12 (your key may be different) to get a boot menu to tell it to boot from the CD. Booted from the CD.
  4. Got the SliTaz desktop and Applications > System Tools > Gparted.
  5. My existing system has a small partition at the front of the SSD then the Windows 10 partition taking up the rest of the disk. Right clicked on the Windows partition, chose Resize and set it’s new size to a little under half the disk. Clicked the Apply arrow.
  6. Created an extended partition in what was left of the disk (around 270G) — I wanted more partitions than all primary would allow. Created within that 3 logical partitions; around 50G for root (/; ext4 — noted that this was allocated sda5), 200G for /home (ext4; sda6) and the rest for swap (sda7). Apply.
  7. Ejected the SliTaz disc, inserted the Ubuntu mini ISO and chose Restart from the SliTaz menus.
  8. Booted install media. The installer defaulted to the text (ncurses) interface. Fine with me.
  9. Chose language and location, and went through keyboard detection.
  10. At network stage I had to chose my Ethernet connection. I was plugged into the onboard Ethernet rather than the NIC, so chose eno1 rather than enp3s0 or whatever it was. Let it all configure automagically.
  11. Set hostname.
  12. Chose mirror and off it went getting the installer components.
  13. Set username and password.
  14. Manual partitioning. Set up sda5 as /, and made it bootable despite the warnings about bootable logical partitions. sda6 at /home and it figured out the swap on its own.
  15. Wrote that to disk and it started installing the base system.
  16. Said OK to automatic security updates.
  17. Chose my software and off it went, downloading around 2000 files.
  18. GRUB detected Windows OK and I said it was OK to install to MBR.
  19. Rebooted without the ISO CD. Saw that the boot menu included Windows, but Ubuntu is the default, as preferred.
  20. Logged in; there was nothing else to do but use it.

Out of the box I could log in from another machine and forward X. Because it was a net install, everything was freshly downloaded and up to date.

 

Dual!

Linux on a USB stick on a thin client

I am installing Debian on a USB stick that will be permanently attached to a Futro X913-T thin client. It will provide the OS of the client.

1. I booted the Debian installer (I used a USB CDROM drive I happen to have, but you could boot from a USB stick).

2. Partitioning, I partition a 16 GB usb stick (sdb) with 3GB swap (the machine has 2GB RAM, so this should allow hibernation by writing the RAM to swap space), the rest as / except I left a few 10s of MB at the front of the drive free. This just seems like a good idea when you want to write a bootable USB. I'm probably wrong! But it does not hurt.

3. Went through install as per normal, installed grub to sdb (sda is the build-in 1GB mSATA drive of the client. It is too small to install Debian on, but currently has SliTaz on it, which the Debian install of GRUB found.)

4. Installed nothing beyond the minimum — unchecked everything when it asked me what software I wanted to install.

5. Modified BIOS settings to boot sdb by default. Since GRUB found SliTaz, I can boot either Debian or SliTaz from GRUB.

On a bare install of Debian — that is, I used the default installer, nothing clever, but unchecked everything when it asked me what I wanted to install, I still fill up nearly 800 MB of disk space. Fat! Then I went to install a display/login manager.

# apt install NAME

Here are the download sizes:

NAME Size (MB)
gdm3    342
sddm    105
lightdm  96
xdm      36
wdm     101
slim     28

So slim it is!

Then flwm and links and xinit and x11-apps; between xinit, flwm and slim, Debian pulls in all the software needed to get a fairly basic but working Xorg system up and running.

Can login to a regular user account and try:

$ startx

Can also reboot and see if the graphical login happens.

startx works, but I get very low resolution screen.

And we are already at 1.1 GB of disk space. Used…

OK, install hwinfo.

hwinfo says video card is Model: “ATI Wrestler [Radeon HD 6250]”

Maybe this is not installed?

# apt search radeon

shows most of it is installed but not all…

# apt install firmware-amd-graphics

This updates the initrd, so we reboot.

Yes, and now we have full resolution.

Good.

What about getting the touchscreen to work? Also, the HID sensor is not working. (Jobs for later. I don’t need them anyway.)

And, bite the bullet, install the 100MB of Firefox and dependencies. A full-on browser is kind of necessary these days. That way the machine is usable standalone for a few tasks. Since it is just on my home LAN, I don’t need to worry about proper remote desktop, I can just use ssh -Y.

Other packages needed included: ssh, wget, curl,,gv, xpdf, poppler-utils, xfig, cups, foomatic-db-compressed-ppds, hpijs-ppds printer-driver-hpijs

OK!

Right so in summary:

Minimal Debian installed on a USB, then added packages I actually wanted.

just use X11 forwarding to log into my desktop box

$ ssh -X -C username@machine

(with X11 forwarding enabled on the desktop box.)

The thin client is quite usable on its own for small tasks, especially because I am not running a full DE, just flwm (and sometimes XFCE), which is my favorite compromise between lightness and simplicity of use.

Sound needed some firmware, but then mpg123 etc all worked fine.

But now we have:

$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sdb2 12G 2.6G 8.1G 24% /

But I have kind of given up on being overly efficient, in the interests of productivity.

Probably was not worth attempting the minimal install.

Now, to use as intended. The basic idea is that the desktop machine (server, or host) should sit there, asleep most of the time. I can wake it up to use locally of course, but I want to wake it up from elsewhere on the LAN, use it and put it back to sleep.

(1) On my big desktop, make sure that X11 forwarding, etc, is enabled in /etc/ssh/sshd_config:

X11Forwarding yes

(2) My big desktop is also set up for wake on LAN (WOL)

(3) Now, I had an issue that I could not SSH in from outside unless I was logged in locally. That’s ok unless I have to reboot remotely. The problem is that my .ssh folder is not visible to the external session. You can look here if that is an issue:

https://help.ubuntu.com/community/SSH/OpenSSH/Keys
https://superuser.com/questions/889615/cant-ssh-into-remote-server-unless-i-login-locally-on-the-server-first

This fixes it.

If the remote reboot/halt is unlikely, another option is just to logon locally, say on TTY5 (Ctrl+Alt+F5) then run vlock and leave it forever.

(3) Now, you want to be able to make the desktop machine go back to sleep after you’re done. If you are superuser you can use pm-suspend. Some suspends (hibernations…) seem to be immune to WOL, so do a few tests.

I don’t know about using only user credentials. Maybe this, but don’t hold me to it: Run visudo and add these lines on the server/host.

username ALL=NOPASSWD: /usr/bin/systemctl suspend
username ALL=NOPASSWD: /usr/bin/systemctl hibernate

These still seem to need a user password (to send a wall message), but not sudo or root password.

(4) So now with the server pm-suspended I can sit down at my thin client and run:

$ wakeonlan aa:bb:cc:dd:ee:11

Where aa:bb:cc:dd:ee:11 is the MAC address of the server. (Run ifconfig on the server to get the details.)

(5) Then:

$ ssh -C -X username@192.168.5.55

Where 192.168.5.55 is the IP address of my server.

(6) Get my work done. If I want to basically get the MATE desktop I use locally on the serer, I can type

$ mate-panel &

and then just foreground and kill it when I am done. Usually, I just run the applications I want from the CLI; (often this is a Windows VM, running in VirtualBox on my server). For example, I might type:

$ VBoxManage startvm "Win7_32bit" &

To start the VM. So, my thin client is a window on to 2 computers: mate-panel effectively gives me a Linux desktop computer, and full screening the VM gives me a Windows.

None of this is very complicated, and a few web searches soon show up the needed details, which may vary from distro to distro… Step-by-step it is:

(1) Set the server up for WOL.
(2) Set the server up for X11 forwarding.
(3) Set the server up to allow external login without a local active session (or just install vlock and login locally and lock the terminal).
(4) Install wakeonlan on the client.
(5) If the server is asleep, run wakeonlan to wake it up.
(6) SSH into the server from the client, possibly using -C compression unless your network is nice and fast.
(7) In my case, mate-panel gives me my Linux desktop (you might not use MATE).
(8) And/or I just run applications as needed.
(9) Rather than logging out, at the end I shut down all my applications and sudo pm-suspend (or use another method to suspend it).
(10) Close the terminal program on the client.

Now, you may find tools like screen and tmux handy — they let you detach from a session (or sessions) on the server, logout and then reattach later when you log back in. In that case, you would detach before suspending.

bash aliases are your friend. In .bashrc (or wherever), something like this on the client:

alias wolmyserv="wakeonlan aa:bb:cc:dd:ee:11"
alias sshmyserv="ssh -C -X username@192.168.5.55"

And on the server:

alias mysuspend='sudo pm-suspend'
alias win7='VBoxManage startvm "Win7_32bit"'

Or whatever.

Futro X913-T thin client — Debian on a USB stick

Fujitsu Futro X913-T thin client with integrated screen — kind of old but useful.

Futro looks like a computer monitor with a larger than usual base and a webcam on top

 

I am installing Debian on a USB stick that will be permanently attached to a thin client. It will provide the OS of the client. The Futro has only 1 GB of inboard storage…

  1. Booted the Debian installer (I used USB CDROM drive I happen to have, but you could boot from a USB stick).
  2. Partitioning: partitioned a 16 GB usb stick (sdb) with 3GB swap (the machine has 2GB RAM, so this should allow hibernation, writing the RAM to swap space), the rest as / (root) except I left a few 10s of MB at the
    front of the drive free. This just seems like a good idea when you want to write a bootable USB.
  3. Went through install as per normal, installed GRUB to sdb (sda is the built-in 1GB mSATA drive of the client. it is too small to install Debian on, but currently has SliTaz on it, which the Debian install of GRUB found, making the Futro dual-boot.)
  4. Installed nothing beyond the minimum — unchecked everything when it asked me what software I wanted to install.
  5. Modified BIOS settings to boot sdb by default. Since GRUB found SliTaz, I can boot either Debian ot SliTaz from GRUB.

A bare install of Debian — that is, I used the default installer, nothing clever, but unchecked everything when it asked me what I wanted to install — I still fill up nearly 800 MB of disk space. Fat! Then I went to install a display/login manager.

$ apt install NAME

Here are the download sizes, keeping in mind that on such a bare system most of the download is dependencies, which might be needed later anyway.

  • gdm3:  342 MB
  • sddm   105 MB
  • lightdm   96 MB
  • xdm          36 MB
  • wdm       101 MB
  • slim          28 MB

So slim it is!

Then flwm and links and xinit and x11-apps.

between xinit, flwm and slim, Debian pulls in all the deps needed to get a fairly basic but working Xorg system up and running.

Can login to a regular user account and try

$ startx

Can also reboot and see if the graphical login happens.

startx works, but I get very low resolution screen.

And we are already at 1.1 GB of disk space. Used…

OK, install hwinfo.

hwinfo says video card is Model: “ATI Wrestler [Radeon HD 6250]”

Maybe this is not installed?

# apt search radeon

shows most of it is installed but not all…

# apt install firmware-amd-graphics

This updates the initrd, so we reboot. Yes, and now we have full resolution. Good.

The Futro has a touch display, which so far I have not got to work. But, on we go … bite the bullet, install the 100 MB of Firefox and dependencies. A full-on browser is kind of necessary these days, especially in a thin client, for which web apps via the browser is an important use case. With Firefox, the machine is usable standalone for more than a few tasks.

Since it is just on my home LAN, I don’t need to worry about proper remote desktop, I can just forward X11.

Install some useful local tools (eg to connect to a local printer).

vim, ssh, wget, curl, gv, xpdf, poppler-utils, xfig, cups, foomatic-db-compressed-ppds

Printer (Fuji Xerox P115w) did not work.

$ vim /var/log/cups/error_log

OK, need to install: hpijs-ppds printer-driver-hpijs

OK!

Just use X11 forwarding to log into my desktop box,

$ ssh -X -C username@machine

-C means use compression — basically, gzip the traffic. This is good if you have good processors to handle the overhead of zipping, but a slow network that cannot handle a lot of traffic. If you have a fast network, which will often be the case using thin clients in a corporate environment, -C is not a good idea. It’s especially bad if your have low performance CPUs on a fast network, because the compress/decompress overhead slows things down. As always, deal with the limiting factors, not everything.)

The thin client is quite usable locally for small tasks, especially because I am not running a heavy, just flwm, which is my faviourite compromise between lightness and simplicity of use, or XFCE if I want some more features.

Sound on the Futro:

Installed mpg123, pavucontrol, alsa-utils, alsamixer

Started pulseaudo manually, sounds awful.

Added various firmware packages (not installed initially because of my minimal install); these cause initrd changes, so reboot.

Seems like all is good; mic, speakers, webcam, all fine. The firmware (eg firmware-linux*) was essential, of course, but is not picked up by the dependencies of the applications you install because it depends on the hardware, and the applications will often work a bit without it.

But now we have:

$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sdb2   12G 2.6G  8.1G 24%  /

Debian is not made to be compact. I’m sure it could be slimmed down, but why bother? Once I cannot fit into the built-in space (which, yes, I could replace with something bigger) I have kind of given up on being overly efficient, in the interests of productivity.

Probably was not worth attempting the minimal install, in retrospect.

Now, to use as intended: The basic idea is that the server or host (which I often use locally as a desktop machine) should sit there, asleep most of the time. I can wake it up to use locally of course, but I want to wake it up from elsewhere on the LAN, use it and put it back to sleep.

(1) On host, make sure that X11 forwarding, etc, is enabled in /etc/ssh/sshd_config:

X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost yes

(2) Set it up for wake on LAN (WOL).

(3) Now, I had an issue that I could not SSH in from outside unless I was logged in locally already. That is ok unless I have to reboot remotely. The problem is (apparently) that my .ssh folder is not visible to the external session.

https://help.ubuntu.com/community/SSH/OpenSSH/Keys
https://superuser.com/questions/889615/cant-ssh-into-remote-server-unless-i-login-locally-on-the-server-first

This fixes it. If the remote reboot/halt is unlikely, another option is just to log in in locally, say on VT 5 (Ctrl+Alt+F5) then run vlock and leave it forever.

(3) Now, you want to be able to make the desktop machine go back to sleep after you’re done. If you are a superuser you can use pm-suspend. Some suspends (hibernations…) seem to be immune to WOL, so do a few tests.

I don’t know about suspending the host using only user credentials. It’s not something you’d want on a multiuser network! Maybe this.  But don’t hold me to it:

Run visudo and add these lines on the server/host:

username ALL=NOPASSWD: /usr/bin/systemctl suspend
username ALL=NOPASSWD: /usr/bin/systemctl hibernate

These still seem to need a user password (to send a wall message), but not sudo or root password.

(4) So now with the server pm-suspended I can sit down at my thin client and run:

$ wakeonlan aa:bb:cc:dd:ee:11

Where aa:bb:cc:dd:ee:11 is the MAC address of the server. (Run ifconfig on the server to get the details.)

(5) Then:

$ ssh -C -X username@192.168.5.55

Where 192.168.5.55 is the IP address of my server.

(6) Get my work done. If I want to basically get the MATE desktop I use locally on the server, I can type

$ mate-panel &

and then just foreground and kill it when I am done. Usually, I just run the applications I want from the CLI; (often this is a Windows VM, running in VirtualBox on my server). For example, I might type:

$ VBoxManage startvm "Win7_32bit" &

To start the VM. So, my thin client is a window on to 2 computers: mate-panel effectively gives me a Linux desktop computer, and full screening the VM gives me a Windows.

None of this is very complicated, and a few web searches soon show up the needed details, which may vary from distro to distro… Step-by-step it is:

(1) Set the server up for WOL.
(2) Set the server up for X11 forwarding.
(3) Set the server up to allow external login without a local active session (or just install vlock and login locally and lock the terminal).
(4) Install wakeonlan on the client.
(5) If the server is asleep, run wakeonlan to wake it up.
(6) SSH into the server from the client, possibly using -C compression unless your network is nice and fast.
(7) In my case, mate-panel gives me my Linux desktop (you might not use MATE).
(8) And/or I just run applications as needed.
(9) Rather than logging out, at the end I shut down all my applications and sudo pm-suspend.
(10) Close the terminal program on the client (ungracefully).

Now, you may find tools like screen and tmux handy — they let you detach from a session (or sessions) on the server, logout and then reattach later when you log back in. In that case, you would detach before suspending. You might make a custom logout script that detaches and  suspends, I guess.

Bash aliases are your friend to save you remembering MAC addresses and all that. In .bashrc (or wherever), something like this on the client:

alias mywol="wakeonlan aa:bb:cc:dd:ee:11"
alias myssh="ssh -C -X username@192.168.5.55"

And on the server:

alias mysuspend='sudo pm-suspend'
alias win7='VBoxManage startvm "Win7_32bit"'

Or whatever.

Anyway, this is a simple way to use a thin client at home to allow your desktop Linux box to be in 2 places at once.

Where there’s a WOL there’s a way.

OSs on the Beetle

Machine:

Wincor Nixdorf BEETLE POS Mini Retail PC

Specifications

  • Genuine Intel Atom CPU 230 @ 1.60GHz, 1 Core(s)
  • 544MB RAM
  • 160GB SATA Hard Drive
  • RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller, Ethernet
  • Intel, 82945G/GZ Integrated Graphics Controller
  • Intel, NM10/ICH7 Family High Definition Audio Controller
  • USB Port (6), LAN Port (1), VGA Port (1), Non Powered RS232 Port (1), Powered RS232 Port (3)

In no case was I prepared to sweat over it. What this means is that it is quite possible that any one of these would have worked fine. But I did not want to spend the time. In the end, my criterion was ‘Does it work out of the box for a lazy person’.

Now, that is just not fair to some OSs. I mean, Debian is a huge, polished project, while many distros are bespoke and the result of a singular vision. This is old, obscure hardware, and when you have limited time and resources, you’re not going to develop for this machine. So please do not take anything here as a value judgement on the OS in question. It is merely observation.

This is especially true in that my main intent for the box is to use it as a backup fileserver, which does not need Xorg at all. X just means I can run a graphical browser (albeit a light one, like netsurf) when I need to hunt up solutions to issues. I have found that FLWM coupled with lightweight applications (netsurf, the old Ted RTF word processor, xosview and so on) gives me a perfectly responsive experience. But I’m not going to fire up Firefox or LibreOffice on 512MB of RAM! surf works fine for the modern web.

All are stable releases as of May 2020, unless noted as rolling.

Slackware 14.2 32-bit — installed readily, X could not configure itself. Did not find a video card.

Kali Linux, 64-bit — this is effectively Debian. It installed readily, everything worked, and it was just a matter of choosing lightweight applications.

SUSE Tumbleweed 32-bit — (rolling release) installer could not complete. I think it ran out of RAM. Again, not a shock — it’s not for old, low spec machines.

Mageia 7.1 32-bit — installer threw an error saying it ran out of memory, and stopped. I quite like Mageia, but it did not suit in this case.

Alpine 3.11 32-bit — could not find/drive the Ethernet adapter. I did not really try to solve this problem.

ReactOS 0.4.13 — (alpha software) could not boot the installer. Again, not unreasonable — ReactOS is not production software.

Slitaz 32-bit rolling release — did not boot. This did surprise me, because I’ve found SliTaZ to be a really handy lightweight distro. But as I said, my hardware is a bit old and obscure. Maybe it did not like the USB CD drive I was using…?

OpenBSD 6.7 — installed, worked out of the box, am using it as the #1 OS on the machine, since I want to use it as a little family file server, amongst other things. I’m not as familiar with BSD as Linux, and I don’t think I set up the partitions ideally (/usr is too small), so that’s a lesson learned. I would not recommend messing around with BSD disklabel trying to allocate partitions on a disk that is already occupied in some places by another OS, to be honest. But X worked fine, it uses relatively few system resources, and the control of daemons and services is nice. Installation relatively manual compared to say Kali.

TinyCore — installed, worked fine. I had some trouble setting up the bootloader — it installed LILO over the GRUB that I had set up with Kali Linux, and for a while I could only boot TC. Then I installed grub on TC, it found the config file that Kali had written to the boot blocks, and I was able to boot into Kali and then set up 40_custom to boot TC, and later OpenBSD. I only put TC on to see what I could see. It sits on a 5GB partition and runs very nicely. Amazing little distribution.

Conclusion

In the end I have Kali, TC and OpenBSD on the HDD, with a grub menu at the front and OpenBSD set as the default.

For an inexperienced user, it’s hard to go past Debian or one of its derivatives. I liked Kali because the initial install image download is less than half the size of the Debian netboot iso image, and seeing as I did not plan to install a lot of stuff anyway, it made sense to use small install media.

A BSD just seemed to make sense on an older machine that was going to spend a lot of its time serving files, and FreeBSD seems too shiny and more suited to newer hardware, and I’ve messed around with NetBSD and I know it could have done a perfectly good job, so it seemed like a good time to try OpenBSD.

OpenBSD needs more user knowledge than Debian to install, and one must be prepared to read the documentation — but the documentation is second to none. When I first installed it, I did not even know that I needed to use pkg_add to install more software! A few days later, we’re using it as a family file server to back up photos and movies. A more helpful partitioner/disklabel editor would be nice, I must say. On the other hand, I really like the relatively minimal yet functional system you get after the install. You can add to it very easily, but it’s not crowded with lots of stuff you never asked for. When I first started it up I typed lynx then links then wget then … and none was already installed. So what is on the system is what I put there!

 

yunvgf nxsofksdfkjbfjuvgbcfgh dfhsdfbn45

Booting Linux, FreeDOS and ReactOS from GRUB2

I have a Compaq E500, an old Pentium III, 32-bit x86-compatible machine just for messing around with. It has USB and FDD and CD and serial and parallel and even TV output. Very flexible. Plus the Ethernet card is Intel E100, so drivers are no problem. It currently runs:

  • SliTaz GNU/Linux (very good on old hardware, and with very small (50 MB) install media). It is kept up to date, but kernel is getting old; more details in a separate post.
  • ReactOS 0.4.13 (needs some drivers at present to really get it to work anywhere near its capabilities).
  • FreeDOS 1.3 RC3.

All I want to discuss here is how I set up GRUB2 to boot them all. Just to record it for my own records and in case anyone else finds it useful. I am not going into each install procedure in detail; this is about the boot setup. Where I say SliTaz, you can insert the name of you preferred distro. I am using SliTaz because it is snappy on 20-year-old hardware. You will probably use something bigger on more modern hardware.

It is helpful to install them in the correct order. FreeDOS will only (AFAIK) install onto the first partition, and will write its bootloader to the MBR, right at the front of the disk. This means if you have already installed GRUB it will get overwritten and you’ll only be able to boot FreeDOS. This is not really a problem, but adds extra steps (see below).

Here is one possible procedure (this assumes we’re using the first HDD, which will be /dev/sda in Linux parlance):

  1. Boot a Linux live disc — I used the SliTaz live CD. Run gparted (a nice and easy-to-use graphical partitioning tool).  Create 4 partitions, with the one at the front of the disk (sda1) for FreeDOS. ReactOS will go on sda2 and SliTaz in sda3. The last one (sda4) is Linux swap (which is best at the front of the disk — see comments — which I will do from now on). sda1 and sda2 are formatted FAT32, sda3 is an ext file system. I chose an msdos partition table. May be good to mark the bootable flag on the FreeDOS partition. Do not install Linux yet.
  2. Boot the FreeDOS 1.3RC3 live disc and install to sda1. I prefer a minimal install, with just the base system plus a few networking tools, then using FDNPKG (FreeDOS’s answer to apt or yum) to install what I want later. More detail in later posts! It will install its bootloader to the MBR, but we don’t care because we’re booting from discs for now.
  3. Boot the ReactOS disc and choose sda2. Let it install, but write the boot loader to the partition (sda2) not to the MBR. TBH I cannot exactly remember the menu options. The ReactOS bootloader, FreeLoader, can possibly also work as your boot manager, but that’s not what I’m writing about here. Instead, we install it to the front of the partition and load it from GRUB2.
  4. Boot the SliTaz live disc again and install it to sda3 using sda4 as swap. (Details elsewhere). Install the bootloader, GRUB2, and reboot. GRUB will only give SliTaz as a boot option, but that’s ok. Boot SliTaz (or whatever Linux you’re using).
  5. Open a root terminal and set up GRUB2: The main issue is the 40_custom file. Here is one that works for me:
$ cat /etc/grub.d/40_custom 
#!/bin/sh 
exec tail -n +3 $0 
# This file provides an easy way to add custom menu entries. Simply type the 
# menu entries you want to add after this comment. Be careful not to change 
# the 'exec tail' line above. 
# 

menuentry 'ReactOS 0.4.13' { 
  load_video 
  insmod gzio 
  insmod part_msdos 
  insmod fat set 
  root='(hd0,msdos2)' 
# Below is from ReactOS wiki 
  chainloader +1 
  parttool (hd0,2) boot+ 
  multiboot /freeldr.sys 
} 

menuentry 'FreeDOS1.3RC3' { 
  load_video 
  insmod gzio 
  insmod part_msdos 
  insmod fat 
  set root='(hd0,msdos1)' 
  parttool (hd0,1) boot+ 
  chainloader +1 
}

What’s going on?

I don’t know if all the insmod lines are needed, but this works so I am not messing with it. They install drivers (modules) that deal with msdos partitions and fat file systems. I suspect the video and gzio lines are not needed, at least for FreeDOS (FreeDOS entry was mostly copied from the ReactOS one). ReactOS probably needs them; it has a splash screen and all.

The parttool line sets the bootable flag on the specified partition. Don’t know if this is needed if the flag is set (as it was for FreeDOS when I used gparted), but no harm done.

The root line defines the root of the file system in GRUB notation.

GRUB2 finds the Linux install automatically, so that is not in here.

We then update grub (as root):

# grub-mkconfig -o /boot/grub/grub.cfg

and can set the default entry by reading the man page for grub-set-default.

Something else.

Haiku RC1 beta 2 on an old netbook

My old Acer netbook is finding it harder and harder to run any operating system. I am thinking of changing away from Debian as the main OS. In a similar vein, I wondered how it would go with Haiku.

First, I plugged in a USB CD drive and booted an iso image that I knew could run as a live disk and included gparted — SliTaz rolling, which has the advantage of being a small download and is a good OS itself.

I used that to shrink the Debian partition and leave a few tens of GB at the back of the disk.

I downloaded the Haiku anyboot image and burned it to a DVD and used the same USB CD drive — but boot failed.

I then wrote the image to a USB stick, and that booted no problems.

The unmounted USB stick was in /dev/sdb, and all you have to do on a Linux machine is:

$ sudo cp image.iso /dev/sbd

The netbook uses a 32-bit Intel Atom N550 chip, so it was the 32-bit version of Haiku, released roughly end of May 2020.

Install went without any trouble. I found it odd that no login was asked for — it really is a single-user, desktop operating system! I never used classic Mac. So the nearest thing for me was older Windows versions.

When I rebooted, I rebooted into Debian and edited /etc/grub.d/40_custom.

#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.

menuentry "Haiku RC1 Beta 2" {
set root=(hd0,4)
chainloader +1
}

Afterwards, ran update-grub and rebooted, and chose the Haiku entry off the GRUB menu. Of course, your entry might differ from mine, depending in what disk and partition Haiku is on. So that’s that.

What is the experience?

Keep in mind it is beta software.

Very good! 

  • LibreOffice — tick (or ‘check’ if you prefer)
  • after an update in mid-2020, the WebPositive browser worked with Gmail. 
  • Calligra (another office suite) — tick
  • Depot (package repository) — works out of the box
  • kolourpaint (bitmap painting program) — tick
  • web positive, netsurf, otter browser — tick
  • sound — tick
  • wireless and wired networking — tick
  • a whole bunch of useful command line tools, giving you pretty much the full set
  • lots of handy console programs like mutt
  • my ext2 file system mounted automatically*
  • responsiveness — improved!

On the whole, very usable, very good. Obviously I’m unfamiliar with the interface, but, allowing for that, it’s pretty good.

* Security: No login needed for Haiku, but it can mount the other file systems on the disk (depending on the file system type).  This is clearly a security issue. Maybe find out how to force a login/password for Haiku, or in GRUB, or in the BIOS.

What’s not so good?

  • Security.
  • None of the web browsers worked with Gmail, or WordPress — and I did try quite a few browsers and with various settings (including plain HTML Gmail).
  • The first thing I do on a netbook is disable clicking via trackpad, because I touch it by accident when typing and the cursor ends up in the wrong place in my document and it’s a pain fixing it — and I cannot find trackpad settings in Haiku. ** Install PadBlocker ** to turn off the touchpad while typing.
  • The webcam does not work, at least not out of the box. And I could not care less, so have not tried to remedy it. I don’t count this as a negative.
  • No LaTeX, though there are hints on the interweb about installing a texmf tree and then manually adding binaries; I don’t have the time for that right now.
  • qVim seems buggy and command line Vim did not install.
  • Some programs I use don’t seem to be there, though I expect if I tried hard enough I might be able to compile some of them. And that’s not a fair criticism anyway. There are alternatives that do work in most cases (eg mutt instead of alpine).

Conclusion

Haiku is not ready for prime time, but it’s closer than you might think. I have found it very solid in that it does not fall over or crash. A couple of applications (qVim, mainly) do crash unexpectedly. Some of the software is rather old. The web browsing is fine unless you need Gmail or WordPress (and maybe other sites that I did not test because I don’t use them).

If you use it for, say, writing, most web browsing, and a bit of media work (images, sound, whatever) you’ll probably have no problems. FocusWriter is in the Depot, as well as some text editors and office suites. The internet radio app worked out the box, like a charm. 

It is responsive and very usable on the netbook, and I’ve been booting into it regularly. The mounting of my Linux partitions is a security hole, but it does make file sharing easy.

Give it a go!