Linux on the Toshiba Tecra C50-E1516
Author: Michael Minn (www.michaelminn.com)
8 December 2022
Introduction
This page describes how to set up a Debian 11.2 (Bullseye) Linux operating system on a Toshiba Tecra (Dynabook) C50-E1516 notebook computer.
Dynabook was Toshiba's personal computer division until it was sold to Sharp Corporation in 2018. As of this writing, Sharp is majority-owned by Foxconn. However, Dynabook still maintains some Toshiba branding on products, including this machine.
The machine that I purchased on 15 August 2021 features:
- Intel Core i5-8250U 3.4 GHz four-core/eight-thread Processor with 6MB SmartCache
- 8 GB RAM DDR4 2400 MHz SDRAM (one of two slots occupied)
- 1 TB 5,400 SATA Toshiba MQ04ABF100 hard drive
- 15.6-inch-diagonal WXGA (1366 x 768, 16:9) TFT LED-backlit display
- Intel UHD graphics 620 with 64MB-1696MB shared graphics memory
- Two USB 2.0 ports
- Two USB 3.0 ports
- VGA Port
- One HDMI port
- Card Reader: SD, SDHC, MS, MS Pro, MMC, xD
- Realtek ALC 255 audio with speakers, a microphone, and a 1/8" audio in/out jack
- DVD SuperMulti drive supporting 11 formats
- Chicony Electronics Co., Ltd TOSHIBA Web Camera - HD
- Intel Dual Band Wireless-AC 8265 (rev 78)
- Intel I219V (rev 21) Ethernet controller
- Dimensions: 14.9" x 10.2" x 0.9"
- 4.78 pounds
- 101-key US keyboard with keypad and ouchpad
- 45 watt power supply
- Purchased from CDW for $772.11
Network Install
A network install after booting from a flash drive is fairly straightforward except for partitioning. The following are my choices and you may need to choose other options depending on your situation.
This install assumes you have a wired ethernet connection.
This installation is based on a Linux-only installation.
Download: the netinst from Debian.org and use it to create a bootable flash drive. Assuming you already have a Linux box, the ISO can be directly copied to the flash drive device. Assuming the device is /dev/sdb (you can check with the dmesg command), all you need is a simple copy:
sudo cp debian-8.5.0-i386-netinst.iso /dev/sdb sync
Boot from Flash Drive: Insert the flash drive into an USB slot and reboot When the American Megatreds BIOS splash screen comes up press F-12 and choose USB Memory.
The machine takes a few seconds to load the OS. You can press ESC to view boot messages, although there aren't alot of meaningful ones issued anymore.
Installer Menu: Select Install
Select a Language: Your choice (mine is English)
Select Your Location: Your choice (mine is United States)
Configure the keyboard: Your choice (mine American English)
Detect network hardware: You must have ethernet plugged in.
Load missing firmware from removable media?: The wireless card needs firmware. You can install it later (see below).
Hostname: Arbitrary choice that doesn't matter much unless you're setting up a web server. You can change it later in /etc/hostname
Domain Name: Another arbitrary choice that doesn't matter much unless you're setting up a web server
Root Password: Choose the way you choose a spouse: memorable but strong
User Account Real Name: You may want to use a fake name to preserve anonymity
Username: This will be what you normally log in with
Password: Ditto
Time Zone: Your choice (Central)
Partition disks - method: Using Guided - use entire disk, with Separate /home partition.
Partition disks - select disk: SCSI2 (0,0,0) (sda) - 1.0 TB ATA TOSHIBA MQ04ABF1
Partitioning scheme: Separate /home partition
Overview I modified the guided scheme to expand / to 100 GB and swap to 9 GB:
SCSI2 (0,0,0) (sda) - 1.0 TB ATA TOSHIBA MQ04ABF1 1.0 MB FREE SPACE #1 536.9 MB B f ESP #2 100.0 GB f ext4 / #3 9.0 GB f swap swap #4 890.7 GB f ext4 /home 728.6 kB FREE SPACE
Installing the base system: The installer will run for a few minutes
Configure the package manager: This determines which mirror server to use. Closer is better. I chose United States and debian.uchicago.edu.
HTTP Proxy: If you're in a corporate network, you may need one. Home folks can usually leave this blank
Select and install software: This will take a few minutes depending on your internet speed.
Configurinng popularity-context: Sounds too Windoze-phone-home. No.
Software Selection: Another personal preference. I use IceWM as a window manager with no desktop (see below), so my choices were the Debian Desktop, no graphic desktop (GNOME) but with standard system utilities.
Package Installation: With my choices, the system had to retrieve 1366 files, which took around 45 minutes.
Finish the Installation
Unneeded Services
By default Debian enables a number of services that may be unneeded by single-user machines, and may present security vulnerabilities.
netstat displays open ports, and when run as root with the -lp options, you see the processes listening on those ports.
$ sudo netstat -lp Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 4819/rpcbind tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 4598/exim4 tcp6 0 0 :::111 :::* LISTEN 4819/rpcbind tcp6 0 0 ::1:25 :::* LISTEN 4598/exim4 tcp6 0 0 :::6566 :::* LISTEN 4639/saned udp 0 0 0.0.0.0:754 0.0.0.0:* 4819/rpcbind udp 0 0 0.0.0.0:5353 0.0.0.0:* 4672/avahi-daemon: udp 0 0 0.0.0.0:1900 0.0.0.0:* 4705/minissdpd udp 0 0 0.0.0.0:49012 0.0.0.0:* 4672/avahi-daemon: udp 0 0 0.0.0.0:68 0.0.0.0:* 1736/dhclient udp 0 0 0.0.0.0:111 0.0.0.0:* 4819/rpcbind udp6 0 0 :::754 :::* 4819/rpcbind udp6 0 0 :::5353 :::* 4672/avahi-daemon: udp6 0 0 :::111 :::* 4819/rpcbind udp6 0 0 :::35143 :::* 4672/avahi-daemon:
None of these open ports are necessary on a single-user system except port 68 (bootpc) used by dhclient with DHCP to get an IP address from your ISP.
Services can be stopped with:
sudo service <service> stop
Services can be disabled so they are not started at boot time with:
sudo update-rc.d <service> disable
The following are services I stopped and disabled:
- bluetooth
- saned (network scanning)
- avahi-daemon (web server)
When those are shut down, netstat gives a nice, clean, secure listing:
$ sudo netstat -lp Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name udp 0 0 0.0.0.0:bootpc 0.0.0.0:* 1719/dhclient
Networking
The Intel Dual Band Wireless-AC 8265 (rev 78) is supported by the iwlwifi in the kernel, although you will need to install firmware.
Firmware
Add a non-free repository to /etc/apt/sources-list
deb http://deb.debian.org/debian bullseye main contrib non-free
Install the firmware-iwlwifi package:
sudo apt-get update sudo apt-get install firmware-iwlwifi
When you reboot, iwconfig should show the device as wlp1s0:
$ sudo iwconfig wlp1s0 IEEE 802.11 ESSID:off/any Mode:Managed Access Point: Not-Associated Tx-Power=0 dBm Retry short limit:7 RTS thr:off Fragment thr:off Encryption key:off Power Management:on
Manual Configuration
I prefer to start and stop my networks manually, and removed the network-manager to avoid conflicts and problems encountered on other machines:
sudo apt-get remove network-manager
This will require you to add an entry to /etc/network/interfaces for the ethernet card:
rename ehp0s31f6=eth0 iface eth0 inet dhcp
The interface can then be started with the ifup command:
sudo ifup eth0
The interface can be stopped with the ifdown command:
$ sudo ifdown eth0
Wireless Configuration
For an open wireless network, you will need to add the SSID to the interface entry to /etc/network/interfaces.
iface wlp1s0 inet dhcp wireless-essid <SSID>
For secure networks, you will need to add both the SSID and password that wpa_supplicant can use to associate with the network.
iface wlp1s0 inet dhcp wpa-ssid <SSID> wpa-psk <PASSWORD>
To have the interface start automatically on boot:
auto wlp1s0 iface wlp1s0 inet dhcp wpa-ssid <SSID> wpa-psk <PASSWORD>
The interface can then be started and stopped with the ifup and ifdown commands:
$ sudo ifup wlp1s0 $ sudo ifdown wlp1s0
Wireless Diagnostics
If the file configuration does not work, you may need to investigate further. You can start the interface with the ifconfig command.
$ sudo ifconfig wlp1s0 up
Access points can be displayed with the iwlist command:
$ sudo iwlist wlp1s0 scan
Access points can be configured with the iwconfig command:
$ sudo iwconfig wlp1s0 essid <SSID>
Note that the networking subsystem may not allow you to set an SSID directly, and dmesg will show the following messages. You will need to set the SSID in the /etc/network/interfaces file as shown above.
[1799230.571751] wlp1s0: authenticate with dc:b8:ac:83:b8:c2 [1799230.582457] wlp1s0: send auth to dc:b8:ac:83:b8:c2 (try 1/3) [1799230.584963] wlp1s0: authenticated [1799230.588207] wlp1s0: associate with dc:b8:ac:83:b8:c2 (try 1/3) [1799230.589706] wlp1s0: RX AssocResp from dc:b8:ac:83:b8:c2 (capab=0x401 status=0 aid=1) [1799230.593652] wlp1s0: associated [1799230.594792] wlp1s0: deauthenticating from dc:b8:ac:83:b8:c2 by local choice (Reason: 3=DEAUTH_LEAVING)
Multimedia
The webcam is /dev/video0 and you can look at yourself with:
mplayer tv://dev/video0
This machine has an optical disk drive named /dev/sr0 you can use to burn CDs and DVDs.
Data CDs or DVDs can be burned on-the-fly with the growisofs utility from the dvd+rw-tools package. Assuming your files are in <directory>:
sudo growisofs -Z /dev/sr0 -R -J <file_directory>
wodim can be used to burn audio CDs from .wav files:
sudo wodim -v dev=/dev/sr0 -audio -pad *.wav
Removing systemd
systemd is an init system that bootstraps user space and manages processes. It has largely replaced the UNIX System V init systems on most distributions, with the objective of unifying basic Linux configurations across distributions.
systemd has provoked considerable controversy because of its complexity and its violation of fundamental Unix dependency philosophy.
It is actually fairly easy to remove and replace with classic Sys V, as described in these instructions. As with any major system change, full backup is recommended before proceeding.
Note that some user application packages are dependent on systemd, and will try to reinstall systemd if you try to install those packages. Notable ones include the kdenlive video editor, openshot-qt video editor, and vokoscreen video recorder. Keep an eye out for this when installing new packages.
- Install the System V init packages:
- Copy the new inittab booting run level file:
- Add this line to /etc/default/grub (not sure this is necessary):
GRUB_CMDLINE_LINUX_DEFAULT="init=/lib/sysvinit/init text"
- Update the GRUB bootloader:
- Set up /etc/X11/Xwrapper.config to run Xorg as root.
While
past versions of X accessed hardware directly and
needed root access, some current drivers use kernel mode-setting (KMS).
Although I'm not clear exactly what is going on with
the driver for this chip, startx as a user other
than root fail with messages like these:
[ 27.330] xf86EnableIOPorts: failed to set IOPL for I/O (Operation not permitted) [ 27.907] (EE) modeset(0): drmSetMaster failed: Permission denied [ 27.907] (EE) Fatal server error: [ 27.907] (EE) AddScreen/ScreenInit failed for driver 0
The workaround is to install the xserver-xorg-legacy package and add the following line to the /etc/X11/Xwrapper.config file:
needs_root_rights=yes
- Reboot
- Remove the systemd package:
- Create the /etc/apt/preferences.d/systemd file and add these lines to it. Pinning allows pulling particular packages from a later release version. Giving systemd packages negative pin priority prohibits installation.
- Verify systemd is gone from your system. It is an insidious package that is a bit difficult to confirm is gone:
sudo apt-get install sysvinit-core sysvinit-utils
sudo cp /usr/share/sysvinit/inittab /etc/inittab
sudo update-grub
sudo reboot
sudo apt-get remove --purge --auto-remove systemd
Package: systemd Pin: release * Pin-Priority: -1 Package: *systemd* Pin: release * Pin-Priority: -1 Package: systemd:amd64 Pin: release * Pin-Priority: -1 Package: systemd:i386 Pin: release * Pin-Priority: -1
aptitude search systemd The systemd package should be listed with a "p" beside it, indicating it is a package that is not installed pstree -p The root process should be init rather than systemd ls -l /sbin/init The file /sbin/init should be an executable binary (ELF) file rather than a symbolic link
Removing the Desktop
If you're hard core command line and don't want the clutter and delay of the a desktop, you might consider getting rid of the desktop altogether and just using a window manager to manage xterms and X applications started from the xterms. This will speed your boot time a bit and get rid of some annoying background daemons.
IceWM: Rather than a desktop, I use the ICE Window Manager which is much faster and lighweight than bloated desktops like GNOME, while having some helpful features like a task bar with graphical system monitoring:
sudo apt-get install icewm
.xinitrc is a file that is executed when X is started. Create a .xinitrc in your home directory (/home/<username>) and type the following lines. This creates a couple single terminal window, sets the "desktop" color to pleasant shade of greenish grey blue and starts the window manager. When you type "startx", from the text login, it will start an xterm, in which you can type commands to start other programs. You can create additional terminal windows from a popup menu when you right-click on the desktop.
I found the full brightness to be a bit much, especially in contrast to older, dimmer LCD displays. The backlight doesn't seem to be accessible through ACPI, but the xgamma command adjusts midtones (gamma) and warms things up a bit, although this is optional.
xgamma -gamma .7 xsetroot -solid "dark slate gray" xterm -geometry 128x24+10+10& xterm -geometry 128x24+10+375& exec icewm
xgamma -gamma .7
IceWM Themes: There are a wide variety of additional IceWM themes available at ice-wm.org". I happen to be fond of Crux-Teal
Configure GRUB for terminal mode start: It is helpful to see what is goin on during boot rather than have boot messages hidden behind the splash bitmap just in case there's a boot problem (which used to happen alot). Adding this line to the /etc/default/grub file will cause the machine to boot in console mode:
GRUB_TERMINAL=console
Then run:
sudo update-grub
After these changes, on boot you will see the system startup messages and then be greeted with a console login prompt. After logging in, you can use the startx command to start the graphical desktop.
startx
PulseAudio is a nasty sound server that adds latency and eats up CPU. If you don't have the desktop you can ditch it.
sudo apt-get purge pulseaudio
TrueType Fonts
The X window server supports TrueType (tm) fonts, although installing them via the command line is a bit more cumbersome than with an installer program or package. If you've got some on a Windoze box, TrueType fonts tend to look quite a bit better than the fonts that come with the distributions. And if you're doing any web development, you need them to have at least a guess as to what your pages look like on a Windoze box.
Unfortunately, the FontPath configuration that specifies the directories where fonts are located is compiled into the X binary and is not configurable. While "xset +fp" can add a directory to the font path, that setting is not permanent and is lost when you reboot. xset cannot be added to a local configuration file like .xinitrc. This is not a problem for newer applications that use fontconfig, but this may represent an issue for older applications that only use the X font paths. The kludge is to copy the fonts you want to add into one of the configured truetype font directories.
Copy the fonts into a shared font directory: You can do an "xset -q" to find the configured Font Paths for your X configuration:
xset -q
Chose one of the directories listed in "Font Path" and copy your .ttf font files into that directory. In my case, I chose to use /usr/share/fonts/X11/misc. While you could create a new directory under /usr/share/fonts, fonts installed there would not be visible to xlsfonts or older X applications.
sudo cp your-fonts/*.ttf /usr/share/fonts/X11/misc
Then run mkfontscale to create the fonts.scale file and mkfontdir to create the fonts.dir files used by the X server. You should also change the owner of all the files to root to avoid permission problems. The mkfontscale and mkfontdir steps are critical if you want to be able to list your fonts with xlsfonts or other legacy X applications.
cd /usr/share/fonts/X11/misc sudo mkfontscale sudo mkfontdir sudo chmod 644 *.ttf sudo chown root:root *.ttf
You can check to verify the fonts are loading by starting an X application (like gimp). The xlsfonts command lists fonts available directly from X and the fc-list command lists fonts available through fontconfig.
xlsfonts | less fc-list | less
The listing will likely be long, but if the fonts are loading correctly, you will see X font names like these (for Arial and Garamond, respectively):
-monotype-arial-medium-i-normal--0-0-0-0-p-0-iso8859-1 -monotype-arial-medium-i-normal--0-0-0-0-p-0-iso8859-10 -monotype-arial-medium-i-normal--0-0-0-0-p-0-iso8859-15 -monotype-arial-medium-i-normal--0-0-0-0-p-0-iso8859-2 -monotype-garamond-medium-i-normal--0-0-0-0-p-0-iso8859-1 -monotype-garamond-medium-i-normal--0-0-0-0-p-0-iso8859-10 -monotype-garamond-medium-i-normal--0-0-0-0-p-0-iso8859-15 -monotype-garamond-medium-i-normal--0-0-0-0-p-0-iso8859-2
Fonts, especially in the browser may look a bit jagged if fontconfig does not have subpixel-hinting and font-smoothing turned on. Create a .config/fontconfig/.fonts.conf file in your home directory and add the following contents:
<?xml version='1.0'?> <!DOCTYPE fontconfig SYSTEM 'fonts.dtd'> <fontconfig> <match target="font"> <edit mode="assign" name="rgba"> <const>rgb</const> </edit> </match> <match target="font"> <edit mode="assign" name="hinting"> <bool>true</bool> </edit> </match> <match target="font"> <edit mode="assign" name="hintstyle"> <const>hintslight</const> </edit> </match> <match target="font"> <edit mode="assign" name="antialias"> <bool>true</bool> </edit> </match> <match target="font"> <edit mode="assign" name="lcdfilter"> <const>lcddefault</const> </edit> </match> </fontconfig>
Mounting Smartphones and Cameras
Many Android smartphones support media transfer protocol (MTP) to facilitate exchanging data between devices. When you connect your phone to a USB port, the phone's file system is accessible via MTP.
jmtpfs can be used to mount MTP devices on a mount point.
mkdir phone jmtpfs phone
Devices can be unmounted using fusermount -u.
fusermount -u phone
Note that when you mount a phone, you will need to approve the "Allow access to phone data" prompt on your phone.
If you connect often, it may be helpful to create a regular mount point (/media/camera):
sudo mkdir /media/camera chmod 0777 /media/camera
...and add the line below to /etc/fstab so the device can be mounted using the standard mount and umount commands.
/usr/bin/jmtpfs /media/camera fuse nodev,rw,user,noauto 0 0
If you get an Input/output error when attempting to umount, sudo umount will probably solve the problem.
Ever wonder why you drive on a parkway but park on a driveway?