Linux on the Toshiba U505-S2960
Author: Michael Minn (www.michaelminn.com)
21 July 2016
Describes how to set up an Debian 8.5 (Jesse) operating system on a Toshiba Satellite U505-S2960 notebook computer.
This page describes how to install 32-bit Debian 8.5 (Jesse) Linux operating system on a Toshiba U505-S2960 notebook computer.
Details of issues from previous versions are on my Ubuntu 9.10 installation guide or Ubuntu 10.4 installation guide or Ubuntu 12.4 installation guide.
The machine that I purchased in December of 2009 features:
- Intel Core 2 Duo T6600 2.2GHz Processor (64-bit)
- 2MB L2 Cache, 800MHz FSB
- 4GB DDR2 800MHz RAM Max: 8GB
- 320GB (5400 RPM) Toshiba MK 3263GSX SATA Hard Drive
- 13.3" diagonal WXGA (1280 x 800) TruBrite TFT LCD Display
- MATSHITA UJ862ES (1.82) Labelflash SuperMulti DVD+R/RW Double Layer Drive
- Webcam and Microphone
- Intel Graphics Media Accelerator 4500MHD Video with 128MB-1760MB shared graphics memory
- Realtek RTL8172 802.11b/g/n Wireless LAN
- Realtek RTL8101E/8102E 10/100 Ethernet LAN
- Modem RJ-11
- ExpressCard 54/34 Slot
- 85 key US keyboard, Touchpad Enable/Disable button, Media Control Buttons
- Memory Card Reader: SD, SDHC, MS, MS Pro, MMC, xD
- Two USB 2.0 ports (which is not enough)
- Other Ports: eSATA/USB, Headphone/S/PDIF output, Microphone input, VGA, HDMI-CEC, RJ-11 (Modem), RJ-45
- Approximate Unit Dimensions: 12.5" (W) x 9.08" (D) x 1.16"~1.5" (H)
- Approximate Unit Weight: 4.74 Pounds
- Purchased from J & R for $789 + $69.98 NYS tax = $858.98
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)
Missing Firmware: You will get a message about missing a firmware file - rtlwifi/rtl8192sefw.bin. This is in a non-free firmware package (firmware-realtek), but I couldn't get it to load from a flash drive and you can install it later, so just click No and advance to the next step
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: If this is a fresh install and you're not familiar with partitioning, you may want to consider Ubuntu, which has an installer that can split a monolithic Windoze (NTFS) partition for dual booting. This was the latest in a long line of installations, so my partition was already split, so I chose Manual and preserved my existing partition table:
- 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.
/dev/sda1 ntfs 1572 MB /dev/sda2 ntfs /windows 100000 MB /dev/sda5 ext2 /boot 1023 MB /dev/sda6 swap 4094 MB /dev/sda7 ext4 / 29998 MB /dev/sda8 ext4 /home 172246 MB /dev/sda3 ntfs 11131 MB
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
Wireless works fine, but you have to install some firmware>
Sudo: This utility to run superuser commands is not installed in Debian if you set a root password. If you're planning on doing much command line configuration, you will need to install it:
- Open a terminal window
- apt-get install sudo
- visudo to edit the /etc/sudoers file
- Add your username. For example, if your username is joe:
joe ALL=(ALL:ALL) ALL
Realtek Firmware: Install the firmware-realtek package
sudo apt-get install firmware-realtek
Reboot: Reboot and the wireless should be available
Remove Network Manager: The network manager causes problems with manually starting and stopping interfaces. If you have problems associating with access points, you may want to remove it:
sudo apt-get remove network-manager
Wireless Interface Terminal Commands: 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>
RF-Kill: One oddity that appeared with the 3.0 kernels is that the front panel wireless switch can no longer be switched on after booting. If the switch is off when you boot, you will have to turn it on and reboot to get wireless, although it can switch the interface off and on if it was on during boot.
This seems to have something to do with software and hardware RF-kill. A message you may get when trying to start the device is:
RTNETLINK answers: Operation not possible due to RF-kill
I did try removing the rfkill tool (sudo apt-get remove rfkill), although I'm not sure whether that was what enabled switching off.
Disassociation Problem: FYI: the network-manager issue vexed me for months until I read about it deep in a support thread. Notably, the chip would seem to try to connect to an AP, but immediately disassociate:
[ 1234.999078] rtl8192_SetWirelessMode(), wireless_mode:4, bEnableHT = 0 [ 1235.008234] SetHwReg8192SE():HW_VAR_AC_PARAM eACI:0:a425 [ 1235.008240] SetHwReg8192SE():HW_VAR_AC_PARAM eACI:1:a449 [ 1235.008244] SetHwReg8192SE():HW_VAR_AC_PARAM eACI:2:5e431c [ 1235.008247] SetHwReg8192SE():HW_VAR_AC_PARAM eACI:3:2f321c [ 1235.008254] Associated successfully [ 1235.008256] normal associate [ 1235.008270] Using G rates:108 [ 1235.008273] Successfully associated, ht not enabled(0, 0) [ 1235.008277] === >rtl8192se_link_change():ieee- >iw_mode is 2 [ 1235.008282] rtl8192_update_cap(): WLAN_CAPABILITY_LONG_PREAMBLE [ 1235.009600] ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready [ 1235.009716] dis associate packet! mode 2 code 3 [ 1235.009956] === >rtl8192se_link_change():ieee- >iw_mode is 2
Network Manager caused a similar deauthentication problem with the ATH5k driver on my EeePC:
[ 51.403537] wlan0: authenticate with 06:01:12:ca:25:05 (try 1) [ 51.409057] wlan0: authenticated wpa_supplicant: No network configuration found for the current AP [ 51.409127] wlan0: associate with 06:01:12:ca:25:05 (try 1) [ 51.412362] wlan0: RX AssocResp from 06:01:12:ca:25:05 (capab=0x421 status=0 aid=59) [ 51.412371] wlan0: associated [ 51.413750] ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready [ 51.413859] cfg80211: Calling CRDA for country: US [ 51.414578] wlan0: deauthenticating from 06:01:12:ca:25:05 by local choice (reason=3)
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
5. Text Boot With No Desktop
I prefer to see what's going on with my machine rather than have the boot messages hidden behind the splash bitmap just in case there's a boot problem (which used to happen alot).
/etc/default/grub: Change these boot options in this file:
systemd: If you're running the infamous systemd init system (and if you don't know what it is, you are), you need configure it for text mode boot:
sudo systemctl set-default multi-user.target
IceWM: Desktop software slows down booting and may have alot of non-power-user overhead you don't need. I use 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.
xsetroot -solid "dark slate gray" xterm -geometry 128x24+10+10& xterm -geometry 128x24+10+375& exec icewm
startx: 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.
6. 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 chown root:root *
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
7. Other Cleanup
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
locate and mlocate are commands that can be used to search for files on your hard drive(s). They use a daily chron script (/etc/cron.daily/mlocate) that shows up in process lists as updatedb.mlocat and sporadically kills your system performance for a few minutes. If you don't use this, remove the package:
sudo apt-get purge mlocate
apt-xapian-index is a maintenance tool for Debian software package information. This sporadically runs update-apt-xapian-index and also tanks system response at unexpected and undesirable times. You can make it go away by removing the package:
sudo apt-get purge apt-xapian-index
whoopsie: is the Ubuntu crash database submission daemon. If you monitor your network at interface start, you will see it sending messages to daisy.ubuntu.com. Smells a little like phone home. B'bye...
sudo apt-get purge whoopsie
AppArmor: is a security policy utility of some kind. It seems to not be used for much anymore.
sudo apt-get purge apparmor
Bluetooth support is enabled by default. I don't ever use bluetooth.
sudo apt-get purge bluez, gnome-bluetooth
Gwibber: is a microblogging client so you can smoke crack without having to light up.
sudo apt-get purge gwibber gwibber-service gwibber-service-facebook gwibber-service-identica gwibber-service-twitter
Zeitgeist is another big-brother event logger.
sudo apt-get purge zeitgeist zeitgeist-core libzeitgeist-1.0-1 python-zeitgeist
Speech Dispatcher is a speech synthesis service that is enabled by default. Thankfully, I do not need this.
sudo apt-get purge speech-dispatcher
CUPS: is the Combined Unix Printing System. If you don't have a printer, you may want to disable the start on boot in the /etc/init/cups.conf script by changing:
start on (filesystem and (started dbus or runlevel )) To: start on runlevel [!0123456]
Necessity is often not the mother of invention. In many cases, it surely has been just the opposite, and invention has been the mother of necessity. (David Nye)