Linux on the Toshiba U505-S2960
Author: Michael Minn (www.michaelminn.com)
21 January 2017
Describes how to set up a Debian 8 (Jesse) Linux operating system on a Toshiba Satellite L745-S4210 notebook computer.
This page describes how to set up a Debian 8 (Jesse) Linux operating system on a Toshiba Satellite L745-S4210 notebook computer.
The machine that I purchased on 22 December 2011 features:
- Intel Core i3-2310M 2.1 GHz two-core/four-thread Processor
- 3MB SmartCache
- 4GB DDR3 1333MHz RAM (max 8GB - two slots, both occupied)
- Toshiba MK6475GSX 640GB (5400 RPM) Serial ATA hard disk drive
- 14-inch-diagonal WXGA (1366 x 768, 16:9) TruBrite TFT LED-backlit display
- DVD SuperMulti drive supporting 11 formats
- Webcam and Microphone
- Realtek RTL8188CE 802.11b/g/n WiFi Adapter (rev 01)
- Qualcomm Atheros AR8152 v2.0 Fast Ethernet (rev c1)
- Mobile Intel HD graphics with 64MB-1696MB shared graphics memory
- Three USB Ports
- HDMI Port
- VGA Port
- Memory Card Reader: SD, SDHC, MS, MS Pro, MMC, xD
- 1/8" audio in/out jacks
- Dimensions: 13.3" x 9.13" x 1.50"
- Five pounds
- 19v 3.42 amp AC adapter: 65W rated, draws around 20 W idle
- Mobile Intel HM65 Express Chipset
- 86-key US keyboard, Touchpad
- Purchased from Best Buy for $511.09
2. 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 assumes that you will be building a system that can dual-boot into either Windoze or Linux. For systems that can run both simultaneously, you will need to explore virtualization software like VMWare.
Defrag: Prior to installing Linux, you should boot into Windoze at least once and defragment the drive. I'm not sure if this is still necessary to maximize available disk space, but it can't hurt. If you've been using Windoze on this box for awhile, you might also consider doing a fresh install, although that takes almost three hours from the recovery disks.
Download: the small installation image 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 the USB device.
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.
Boot Menu: Select Install
Select a Languate: Your choice (mine is English)
Select Your Location: Your choice (mine is United States)
Configure the Keyboard: Your choide (mine American English)
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
First User Full Name: You may want to use a fake name to preserve anonymity
Username: This will be what you normally log in with
Time Zone: Your choice (Pacific)
Partition Method: These were my choices. The partitioning utility will handle splitting the NTFS partition for dual booting.
- Leave /dev/sda1 alone
- Change /dev/sda2 to 100,000 MB, type NTFS
- Add /dev/sdb5 1024MB, type ext2, mount point /boot
- Add /dev/sdb6 4096MB, type swap
- Add /dev/sda7 30000MB, type ext4, mount point /
- Add /dev/sda8 171909MB, type ext4, mount point /home
This left me with the following partition table, which includes three residual (and mysterious) NTFS partitions.
Disk /dev/sda: 596.2 GiB, 640135028736 bytes, 1250263728 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x4e59e2af Device Boot Start End Sectors Size Id Type /dev/sda1 * 2048 3074047 3072000 1.5G 27 Hidden NTFS WinRE /dev/sda2 3074048 198386547 195312500 93.1G 7 HPFS/NTFS/exFAT /dev/sda3 1221472256 1250263039 28790784 13.7G 17 Hidden HPFS/NTFS /dev/sda4 198387710 1221472255 1023084546 487.9G 5 Extended /dev/sda5 1205143552 1221472255 16328704 7.8G 82 Linux swap / Solaris /dev/sda6 198387712 1205143551 1006755840 480.1G 83 Linux
Installing 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 my Alma Mater, debian.cites.illinois.edu
HTTP Proxy: If you're in a corporate network, you may need one. Home folks can probably leave this blank
Configuring Popularity-contest: Sounds too Windoze-phone-home for me (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, no print server, standard system utilities.
Package Installation: With my choices, the system had to retrieve 1468 files, which took around 20 minutes
Install the GRUB Boot Loader on a Hard Disk: Yes
Device for Boot Loader Installation: /dev/sda
Finish the Installation
3. Intense Processor Activity (GPE Storm)
You may notice intense and continuous processor activity that heats up the machine and chews up processor capacity. On my machine this was visible as a very active kworker process, and I found this was caused by a GPE Storm, which is caused by an embedded controller sending bogus ACPI events to the kernel. Seems to be a firmware bug.
The solution is to add the following line to the /etc/rc.local file, which disables interrupt 1D:
echo disable > /sys/firmware/acpi/interrupts/gpe1D
You can also run that line from a terminal to disable that interrupt on a running system:
sudo echo disable > /sys/firmware/acpi/interrupts/gpe1D
Network Manager: This version of Debian comes with a driver for the internal wireless network interface, which appears as wlan0. 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
The wireless network can be started with the command "ifup wlan0" and stopped with "ifdown wlan0". Don't forget to turn on the wireless switch on the front edge of the machine (next to the antenna graphic).
Access points can be displayed with the "iwlist wlan0 scan" command and configured with "sudo iwconfig wlan0 essid <ESSID>". If you use a specific ESSID regularly, you can add an entry for it to the /etc/network/interfaces file (replace ESSID with the name appropriate to your network):
iface wlan0 inet dhcp wireless-essid <ESSID>
The webcam is /dev/video0 and you can look at yourself with:
mplayer tv:// -tv driver=v4l2:width=640:height=480:device=/dev/video0
To access the camera, you need to add yourself to the video group:
adduser <username> video
6. Burning DVDs
Data DVDs can be burned on-the-fly with the growisofs utility from the dvd+rw-tools package. Assuming your files are in <directory>:
growisofs -Z /dev/sc0 -R -J <directory>
7. 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 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.
- Install the System V init packages:
- Copy the new inittab booting run level file:
- Add this line to /etc/default/grub with this line (not sure this is necessary):
- Update the GRUB bootloader:
- Remove the systemd package:
- Create the /etc/apt/preferences.d/systemd file and add these lines to it:
- 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 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
8. 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: Although I used the venerable Motif Window Manager (MWM) for a number of years (from the motif-clients package), this version of mwm locks up when X is started. So I switched to the ICE Window Manager, which has a few more features (like a task bar with graphical system monitoring) but is still fast and lightweight:
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
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
However, you will need to deal with protections set up for ALSA that will keep your applications from being able to access the sound devices. Add yourself to the audio group:
adduser <username> audio
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:
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.
9. 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:
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
Our beds are empty two-thirds of the time. Our living rooms are empty seven-eighths of the time. Our office buildings are empty one-half of the time. It's time we gave this some thought. (R. Buckminster Fuller)