Customizing a Lindows MobilePC

How to strip out the Lindows OS and install Debian.

The Lindows MobilePC is a slick piece of hardware; see my review in the December 2003 issue of Linux Journal. I bought one and I'm quite pleased with it. The Linux system it ships with, however, is not what I want, so I have spent some time customizing it to better suit my needs.

The Lindows MobilePC is a notebook called an eNote with Lindows 3.0 installed. For this article, I refer to the notebook itself as an eNote. You need root permissions to do almost everything described in this article.

Make Mine Debian

My favorite version of Linux is Debian GNU/Linux, and I wanted my eNote to run the Unstable branch of Debian. This did not require a complete reinstall because Lindows is based on Debian, and Lindows includes all the essential Debian utilities, such as apt-get. Lindows does not use these utilities but its own Click-N-Run system. Lindows.com could have easily removed those utilities, but it left them in place; that was nice.

So, Lindows is a Debian system with some non-Debian packages installed. To switch over to a Debian Unstable install, I wanted to remove all the non-Debian packages and then update to the latest Debian packages.

Preparing for Trouble

Switching from Lindows to something else offers you several chances to make mistakes that could leave your eNote unable to boot. It's a good idea to plan ahead for what to do if that happens. First of all, if there is any data you care about, back up that data! Even if you just bought your Lindows MobilePC and haven't done anything with it yet, you probably should have a reference copy of the setup files from /etc, so you can figure out how things used to be if something gets messed up. Probably the easiest way to back up the data is to copy it to another computer, perhaps using the scp command.

If at some point your eNote won't boot, how can you recover? An eNote does not include a floppy drive or a CD drive. It does, however, have the ability to boot from a USB device. If you have a USB CD drive, you can boot from an install CD for your favorite Linux distribution. If you prefer Red Hat, SuSE or some distribution of Linux other than Debian, you can use this technique to install a fresh system. The eNote also has the ability to do a network boot, but I have not tried this yet.

If you don't want to use a network boot or a USB device, there still is an easy way to give yourself a safety net: use the swap space to install an emergency kernel and some recovery tools. First, use swapoff to shut down swapping. Next, using a partition editor such as fdisk or cfdisk, change the type of swap partition from 0x82 (swap) to 0x83 (ext2). Then, use mke2fs to create an ext2 filesystem on the partition, and copy your recovery tools into the space.

The Lindows MobilePC comes with a 256MB swap partition, enough room for a lot of recovery tools. You could use the tool set from a Linux recovery disk distribution, but I suggest you simply grab copies of all the tools already available in the Lindows system. Assuming your swap partition is /dev/hda2, as it was on my MobilePC, these commands would do it:

# mkdir /mnt/tmp
# mount /dev/hda2 /mnt/tmp
# cp -pr /boot /bin /usr/bin /sbin /lib /mnt/tmp

Now all that remains is to make sure the bootloader can boot from the /dev/hda2 partition in a pinch. Later, I discuss the GRUB bootloader and return to this issue.

If you use this technique, make sure you have a working bootloader installed before you reboot. The recovery tools can't help you if the problem lies with your bootloader.

Switching to Debian

When it was time for the actual switch to Debian, I took a look at all the packages with

# dpkg -l | less

I knew I wanted to get rid of anything with lindows or xandros in the package name. As the version of XFree86 was a special Lindows version, I figured that was a great place to start. It would not make sense to try to remove XFree86 from a shell prompt running on the KDE desktop, because the whole X environment would be terminated, including my apt-get process. So I needed a shell independent of X. I used Ctrl+Alt+F1 to get a text-mode tty and found that on my Lindows MobilePC that there wasn't a text-mode tty there. So instead I used SSH from another computer on my network, logged in to the MobilePC remotely and got a root shell prompt.

I edited the /etc/apt/sources.list file, which was pointed right at the main US mirror for Debian, and pointed it instead to a mirror closer to my home. Then I updated APT's package list so APT would know what new packages were available:

# apt-get update

Then, it was time to start deleting the stuff I didn't want:

# apt-get remove xfree86-common

APT warned me I was about to remove 126 packages; that's what I wanted, so I pressed the Enter key.

This still left some packages I didn't want, so I built a command line that would find them all and get rid of them. This command looks for all packages with lindows in the name and feeds the list to apt-get remove:

# grep "Package: lindows" < /var/lib/dpkg/available | cut --delimiter=' ' -f2 | xargs apt-get remove -y

Then I did the same for any packages with xandros in the name:

# grep "Package: xandros" < /var/lib/dpkg/available | cut --delimiter=' ' -f2 | xargs apt-get remove -y

I checked to make sure I had done what I intended. dpkg -l was a little bit confusing, because it showed non-installed packages too. So I piped it through fgrep to find only the installed packages (flagged with status ii:

# dpkg -l | fgrep ii | less

Everything looked good thus far, so it was time to upgrade all packages to the latest Debian Unstable versions:

# apt-get dist-upgrade

As sometimes happens with APT, my upgrade hung on some circular dependencies on some packages related to the aRts sound system. I had to delete by hand with dpkg two old packages to get things unstuck:

# dpkg -r libarts1-bin
# dpkg -r libarts1-glib
# apt-get -f install
# apt-get dist-upgrade

Once the dist-upgrade finished, it was time to install the GNOME system:

# apt-get install gnome

This process pulled in 185 new packages and took a while. This step also pulled in XFree86 for me. Again, a few packages didn't install because of circular dependencies. All I had to do was run the command one more time, and everything installed with no further errors:

# apt-get install gnome

I checked to make sure that GDM was installed and found that wasn't. GDM is the login manager I prefer, so I installed it with:

# apt-get install gdm

At this point I decided to run aptitude.

# apt-get install aptitude

aptitude is an ncurses-based APT tool. One of the cool features of aptitude is it can find all the recommended packages and install them. I pressed the G key twice to start the update, and a few dozen more packages installed.

Now, I wanted to make sure that GNOME actually worked, so I manually started up GDM:

# /etc/init.d/gdm start

GDM started, I logged in and my GNOME desktop came right up. I love it when a plan comes together.

______________________

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Does it boot from USB floppy?

Anonymous's picture

I know you mentioned that the eNote boots from a USB device, but I have not seen anywhere on the internet that specifically said that the eNote boots from a USB floppy. Could someone who only wanted to install an OS through floppy just buy a USB floppy drive?

Thanks,
Mark

Re: Does it boot from USB floppy?

steveha's picture

I don't have a USB floppy, so I can't try this, but I'll bet it will work.

It does

Anonymous's picture

Yes, it boots fine from the USB floppy. I've installed multiple distros this way on it.

Re: Does it boot from USB floppy?

elgaard's picture

Or someone who wanted to install an OS could buy a USB Memory stick. A got it to boot from a USB memory stick with a FAT12 partition with syslinux.
http://www.agol.dk/elgaard/lindows.html

Or you could remove the harddrive and put it in a laptop with knoppix in the CD-drive.

lspci -vvxxx

Anonymous's picture

Do you think you could post the output of lspci for your portable? I and some other people that have lindows enote portables are working on various kernel support for the hardware. I also lost the lindows kernel and sleep does not work anymore. It would be useful to know whether or not the portables they are shipping now are similar (hardware wise) to the first versions. I bought mine the first day they were announced.
Thanks in advance,
Jeff

Sleep/Suspend?

barryreich's picture

Can anyone get this thing to sleep or suspend when the lid is closed? I've tried Lindows, Debian, SuSe, even XP (for kicks) to see if it will sleep and it won't. Is this a hardware limitation? I can't imagine someone would make a super light without this capability. Any insight is appreciated.

Re: lspci -vvxxx

steveha's picture

Script started on Wed Nov 19 19:38:52 2003
yoshi:/home/steveha# lspci -vvxxx
00:00.0 Host bridge: VIA Technologies, Inc. VT8605 [ProSavage PM133]
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- SERR- TAbort- SERR- Reset- FastB2B-
Capabilities: [80] Power Management version 2
Flags: PMEClk- DSI- D1+ D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
00: 06 11 05 86 07 00 30 22 00 00 04 06 00 00 01 00
10: 00 00 00 00 00 00 00 00 00 01 01 00 f0 00 00 00
20: 10 e8 10 e8 00 f0 f0 f7 00 00 00 00 00 00 00 00
30: 00 00 00 00 80 00 00 00 00 00 00 00 00 00 0c 00
40: ca cd 00 44 05 72 05 86 00 00 00 00 00 00 00 00
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 01 00 02 02 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

00:07.0 ISA bridge: VIA Technologies, Inc. VT82C686 [Apollo Super South] (rev 42)
Subsystem: VIA Technologies, Inc. VT82C686/A PCI to ISA Bridge
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping+ SERR- FastB2B-
Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- Reset- 16bInt+ PostWrite+
16-bit legacy interface ports at 0001
00: 80 11 76 04 07 00 10 02 80 00 07 06 00 a8 82 00
10: 00 e0 bf ff dc 00 00 02 00 02 05 b0 00 d0 bf ff
20: 00 d0 bf ff 00 d0 bf fb 00 c0 bf ff 00 40 00 00
30: fc 40 00 00 00 44 00 00 fc 44 00 00 ff 01 80 05
40: 1f 16 25 20 01 00 00 00 00 00 00 00 00 00 00 00
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 01 00 a0 00 00 03 00 00 63 04 63 04 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 20 00 00 00 0c 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 1f 16 25 20 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 01 00 0a fe
e0: 00 40 c0 24 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

00:0a.1 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev 80)
Subsystem: Unknown device 161f:2025
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- SERR- Reset- 16bInt+ PostWrite+
16-bit legacy interface ports at 0001
00: 80 11 76 04 07 00 10 02 80 00 07 06 00 a8 82 00
10: 00 00 00 10 dc 00 00 02 00 06 09 b0 00 00 40 10
20: 00 f0 7f 10 00 00 80 10 00 f0 bf 10 00 48 00 00
30: fc 48 00 00 00 4c 00 00 fc 4c 00 00 00 02 80 05
40: 1f 16 25 20 01 00 00 00 00 00 00 00 00 00 00 00
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 01 00 a0 00 00 03 00 00 63 04 63 04 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 20 00 00 00 0c 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 1f 16 25 20 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 01 00 0a fe
e0: 00 40 c0 24 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

00:0b.0 FireWire (IEEE 1394): NEC Corporation: Unknown device 00ce (rev 01) (prog-if 10 [OHCI])
Subsystem: Unknown device 161f:2025
Control: I/O- Mem+ BusMaster- SpecCycle- MemWINV+ VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- [disabled] [size=64K]
Capabilities: [dc] Power Management version 2
Flags: PMEClk- DSI+ D1+ D2+ AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [80] AGP version 2.0
Status: RQ=32 Iso- ArqSz=0 Cal=0 SBA- ITACoh- GART64- HTrans- 64bit- FW- AGP3- Rate=x4
Command: RQ=1 ArqSz=0 Cal=0 SBA- AGP- GART64- 64bit- FW- Rate=x4
00: 33 53 01 8d 07 00 30 02 02 00 00 03 08 40 00 00
10: 00 00 10 e8 08 00 00 f0 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 1f 16 25 20
30: 00 00 00 00 dc 00 00 00 00 00 00 00 0b 01 04 ff
40: 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 02 00 20 00 04 00 00 1f 04 00 00 00 40 02 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 01 80 22 06
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

yoshi:/home/steveha#
Script done on Wed Nov 19 19:38:58 2003

Re: lspci -vvxxx

xiojason's picture

I recently purchased an NEC Versa Daylite E120 notebook, which, as far as I can tell, is quite similar to the eNote.

I don't have it handy at the moment to be able to run lspci -vvxxx, but here's the basic lspci output of it. Please compare it to the eNote's device list above or the additional eNote lspci output listed afterward:

00:00.0 Host bridge: VIA Technologies, Inc. VT8605 [ProSavage PM133]
00:01.0 PCI bridge: VIA Technologies, Inc. VT8605 [PM133 AGP]
00:07.0 ISA bridge: VIA Technologies, Inc. VT82C686 [Apollo Super South] (rev 42)
00:07.1 IDE interface: VIA Technologies, Inc. VT82C586/B/686A/B PIPC Bus Master IDE (rev 06)
00:07.4 ISA bridge: VIA Technologies, Inc. VT82C686 [Apollo Super ACPI] (rev 40)
00:07.5 Multimedia audio controller: VIA Technologies, Inc. VT82C686 AC97 Audio Controller (rev 50)
00:07.6 Communication controller: VIA Technologies, Inc. Intel 537 [AC97 Modem] (rev 30)
00:0a.0 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev 80)
00:0a.1 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev 80)
00:0b.0 FireWire (IEEE 1394): NEC Corporation: Unknown device 00ce (rev 01)
00:0d.0 USB Controller: NEC Corporation USB (rev 41)
00:0d.1 USB Controller: NEC Corporation USB (rev 41)
00:0d.2 USB Controller: NEC Corporation USB 2.0 (rev 02)
00:0f.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)
01:00.0 VGA compatible controller: S3 Inc. 86C380 [ProSavageDDR K4M266] (rev 02)

The PCI hardware is virtually identical. Here's the same command run on an eNote, but with a different version of Linux and lspci:

00:00.0 Host bridge: VIA Technologies, Inc. VT8605 [ProSavage PM133]
00:01.0 PCI bridge: VIA Technologies, Inc. VT8605 [PM133 AGP]
00:07.0 ISA bridge: VIA Technologies, Inc. VT82C686 [Apollo Super South] (rev 42)
00:07.1 IDE interface: VIA Technologies, Inc. Bus Master IDE (rev 06)
00:07.4 ISA bridge: VIA Technologies, Inc. VT82C686 [Apollo Super ACPI] (rev 40)
00:07.5 Multimedia audio controller: VIA Technologies, Inc. AC97 Audio Controller (rev 50)
00:07.6 Communication controller: VIA Technologies, Inc. AC97 Modem Controller (rev 30)
00:0a.0 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev 80)
00:0a.1 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev 80)
00:0b.0 FireWire (IEEE 1394): NEC Corporation: Unknown device 00ce (rev 01)
00:0d.0 USB Controller: NEC Corporation USB (rev 41)
00:0d.1 USB Controller: NEC Corporation USB (rev 41)
00:0d.2 USB Controller: NEC Corporation: Unknown device 00e0 (rev 02)
00:0f.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139 (rev 10)
01:00.0 VGA compatible controller: S3 Inc.: Unknown device 8d01 (rev 02)

The only differences of note would seem to be in the BIOS and that the NEC uses a Pentium III-M processor instead of the Via C3.

The NEC came with Windows XP. I replaced that, installing Debian unstable from scratch, booting off a network install CD in a USB CDROM drive. X and such works well, but power management, processor speed control, and heat seem to be a little problematic.

If there are efforts to get the eNote into more Debian-optimized shape, I'd be very interested in seeing (and helping) get those optimizations also in place for the NEC E120.

Re: Customizing a Lindows MobilePC

Anonymous's picture

Can you just install a new distro from a USB CD-Rom? Something like Suse 9.0.

Lindows Mobile v. YellowDog G-4 iBook

richardmoss's picture

Steve, read your review in print and the follow-up on installing Debian. I was poised to go with TerraSoft's Yellow Dog pre-installed on iBook, 800 mhz PPC.
At bottom line, there's price advantage with Lindows Mobile, but likely absorbed by external CD-ROM, maxing memory, and an 802.11 card. Even at comparable pricing the Lindows arguably could be better choice---but I've not researched it.
OTOH, reading between the lines of the Debian article and other log/blogs, it doesn't sound to me that buying into Lindows is buying into OpenSource software---somehow Lindows seems very propritetary. That may be true also for YellowDog, except that YellowDog is a variant/version of RedHat ported to PPC.

Does this matter? Do you have thoughts or has Linux Journal ever tested iBook/YellowDog as a linux portable?

Many thanks,

Richard Moss

Re: Lindows Mobile v. YellowDog G-4 iBook

steveha's picture

I'm not sure whether anyone at Linux Journal has tested an iBook; I could search the Linux Journal web site, but so could you. I haven't tested one, anyway.

Apple makes very nice hardware; an Apple laptop running Linux is certainly a good option. I didn't want an iBook for these reasons:

0) I wanted an external PCMCIA slot. Last time I checked, an iBook doesn't have any. (The internal AirPort slot is actually a PCMCIA slot, but because it is internal all you can do with it is AirPort.)

1) I wanted a multi-button trackpad. Apple hardware always has one button.

2) I really like the 2.9 pounds traveling weight; I seldom need a CD-ROM, so I won't be traveling with one. I did want a USB2 CD-ROM for emergency recovery, but I got a used one from eBay for about $25 and I'm all set.

3) My digital camera uses CompactFlash, and I love having a CompactFlash slot on my laptop. I don't need to travel with an adaptor.

But if you like the Apple hardware, by all means go for it. You can probably get a sweet deal on eBay, especially if you are willing to get a used one.

steveha

Installing from USB CD-ROM

steveha's picture

Sure, of course you can. I do suggest you back up the files in /etc first, so you can check the factory default settings if you have any trouble getting your new distro to work.

I haven't tried Suse 9.0, so I don't know if it works, but some distros may have trouble installing from a USB CD-ROM. The older the installer, the less likely that a USB CD-ROM will work correctly. SuSE 9.0 is pretty new and I predict it will not have any trouble.

steveha

Webinar
One Click, Universal Protection: Implementing Centralized Security Policies on Linux Systems

As Linux continues to play an ever increasing role in corporate data centers and institutions, ensuring the integrity and protection of these systems must be a priority. With 60% of the world's websites and an increasing share of organization's mission-critical workloads running on Linux, failing to stop malware and other advanced threats on Linux can increasingly impact an organization's reputation and bottom line.

Learn More

Sponsored by Bit9

Webinar
Linux Backup and Recovery Webinar

Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.

In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.

Learn More

Sponsored by Storix