Posted: July 11th, 2010
The network management from console is pretty miserable, and until I can figure out a better method I would rather use the GUI version. In this case, I am trying to get away from Gnome, which uses vast amounts of memory, but maintain the funcionality of Gnomes scripts/interface.
One promising bit of software is Wicd, built to not need any particular window manager, just what I like. (My mouse just died!)
The instructions I did not follow, but which are the right ones, are these. Extracted from their website:
Wicd is included in Debian Sid, so you can just use apt-get install to get it.
You can also use the apt repository. Just add the following line to your /etc/apt/sources.list
deb http://apt.wicd.net lenny extras
where lenny is your version of Debian in lowercase (lenny, sid). You’ll also need to add the key used for signing Wicd by running the following command in a terminal:
wget -q http://apt.wicd.net/wicd.gpg -O- | sudo apt-key add -
Now you can apt-get update and apt-get install wicd to install Wicd. If you are using Lenny and you use Madwifi, make sure to use wext in Wicd.
Summary:
Instructions to install Firefox 3.5 and higher into Ubuntu 9.04, the Jaunty Jackalope. It is very easy but does require some terminal commands. An easy script is provided that you can download to make this easier.
Posted: May 5th, 2010
Just because Ubuntu is at 10.04 doesn’t mean that the 9.04 users (me!) get left behind: I found out a very easy way to update Firefox from the 3.0 version to whatever the latest version is. Even better, this works on the 32 and the 64 bit version, although I think it only installs the 32 bit version.
If you try and install Firefox the normal way on a 64 bit Ubuntu, it won’t work and says it’s the “wrong architecture”, meaning it isn’t a 64 bit program. (I run 64 bit Ubuntu 9.04) However, you can download the installer and get it running manually with these easy instructions:
First go to the temporary folder, it’s where big files get unpacked so it doesn’t fill up your normal user space: cd /tmp
Now use the program “wget” (it’s already installed) to download the latest version of Firefox using: wget "http://download.mozilla.org/?product=firefox-3.6.3&os=linux&lang=en-US" Note: If there is a higher version of Firefox, simply substitute the number 3.6.3 with whatever the most recent version number is. Also, this uses the US English language, but you can change that as well.
What you just downloaded is a compressed file, and you’ll need to decompress it with this command: tar xvjf firefox-*.bz2
tar This is the decompressor program, although others obviously exist
xvjf These are the options to pass the tar program, they tell it to extract the files, be verbose (list the files aas they are uncompressed). use the bzip compression (j), and do this to the following file
firefox-*.bz2 This is the file you downloaded, but using the asterisk (*) lets us select it without typing all the numbers
The next part gets into the real trick. You first want to copy the files you just decompressed into the /usr/lib directory, then into the /usr/bin directory, so it can be accessed like a program. First copy into the /usr/lib folder:
sudo cp -r firefox /usr/lib/firefox-3.6.3
Now backup the old version of Firefox in case you break something. Do this by renaming the old version. In Linux, renaming a file is done by using the "move" command:
sudo mv /usr/bin/firefox /usr/bin/firefox.old
Now we want to make symbolic links (like shortcuts) in the right places to the right files. Symbolic links all take the same form of ln -s [target] [new link], so do this:
sudo ln -s /usr/lib/firefox-3.6.3/firefox /usr/bin/firefox-3.6.3
sudo ln -s /usr/bin/firefox-3.6.3 /usr/bin/firefox
Make sure to restart Firefox, and everything should be fine. Hooray!
If everything broke, you can at least put it back the way it was by changing the links to go back to the original Firefox version:
sudo mv /usr/bin/firefox /usr/bin/firefox.bak
sudo mv /usr/bin/firefox.old /usr/bin/firefox
I also made a simple Bash script which puts all of this together. Just copy the following text into a file and run it in the terminal by using bash [file name] You will have to make the script runnable first by using: chmod +x [file name]
#!/bin/bash
# You can choose the language and pick the most recent version by going here:
# http://www.mozilla.com/en-US/firefox/all.html
# Right click on the link by the penguin, select "copy" in the pop-up menu,
# and replace the folowing link (remember to put quotation marks "" around the link)
LINK="http://download.mozilla.org/?product=firefox-3.6.3&os=linux&lang=en-US"
# Now put the exact version number in--it should be the version number shown
# in the link (use quotations!):
VERSION="3.6.3"
cd /tmp
wget $LINK
tar xvjf firefox-*.bz2
sudo cp -r firefox /usr/lib/firefox-$VERSION
sudo mv /usr/bin/firefox /usr/bin/firefox.old
sudo ln -s /usr/lib/firefox-$VERSION/firefox /usr/bin/firefox-$VERSION
sudo ln -s /usr/bin/firefox-$VERSION /usr/bin/firefox
Let me know if you run into snags, I'll try and help sort things out.
After having been in Ubuntu for so long, it was a slight surprise to me that installing Arch Linux would require me to learn a different way to install programs. I mean, it shouldn’t have been a real surprise, they are different systems, but anyway…
So in Debian I had the easy to use apt-get install [program name] and after a brief poking about on the internets, I found the basic package management commands for the Arch system. The program that Arch uses for package management is pacman. Who would have guessed… Here’s some of the more important commands:
pacman --sync --refresh or pacman -Sy refreshes the local repository list by downloading the full list(s)
pacman --sync --search [name] or pacman --Ss [name] looks for the package of [name] in the local repository and display any that match
pacman --sync --info [name] or pacman -Si [name] shows information about the program [name] by looking in the local repository
pacman --query --info [name] or pacman -Qi [name] will display information about program [name] if it is installed
pacman --sync [name] or pacman -S [name] downloads and installs the program [name] and all dependencies required
pacman --query or pacman -Q lists the packages installed on the computer. Adding a programs name at the end, e.g., pacman -Q [name] will show the program [name] if it is installed
pacman --query --list [name] or pacman -Ql lists the files contained in the [name] package
pacman --query --owns /path/to/file or pacman -Qo /path/to/file displays the name and version of the package which contains the file referenced
The list of repositories that Arch will check when you update/refresh is located in /etc/pacman.d somewhere.
Alright, that’s a simple intro. I’ll play around in Arch for a while to see if I like it, but the experience so far has been fun.
Update: Try these ones here as well:
pacman -Syu Installs all updates, which does take a while but is a good idea
Here’s how to install XFCE, the reasonably lightweight window manager: pacman -S xfce4 but you should have a look at this list of packages (xfce requires xorg):
gtk-xfce-engine – The Xfce-GTK graphics engine
libxfce4mcs – Settings management support for Xfce.
libxfce4util – Non-GUI functions for Xfce
libxfcegui4 – GTK widgets for Xfce
orage – Xfce Calendar
thunar – File manager
xfce-mcs-manager – Settings manager.
xfce-mcs-plugins – Plugins for settings manager
xfce-utils – startxfce4 script, run dialog, etc.
xfce4-appfinder – Application finder
xfce4-icon-theme – Icon theme
xfce4-iconbox – Simple application management, similar to taskbar.
xfce4-mixer – Volume control plugin for the panel
xfce4-panel – Xfce Panel
xfce4-session – Session management
xfce4-systray – System tray plugin for the panel
xfce4-toys – Small toys for Xfce
xfce4-trigger-launcher – Trigger launcher panel plugin
xfdesktop – Allows desktop wallpaper, icons, and menus
xfprint – The Xfce Print package
xfwm4 – Xfce Window Manager
xfwm4-themes – Themes for Xfce Window Manager
Summary:
Links2 is a text-based web browser that can be run from the terminal, but also has the ability to display graphics. In Debian the installation is simple, since the application is in the repositories. Shortcut keys and additional options are shown.
When I installed a version of Linux on my desktop, I played around with the bootloader and accidentally broke it. Thankfully I had my handy hacked Zipit Z2 to let me search online. At the moment, I didn’t have a graphical browser, so I used the awesome text browser: Links2. I’ll show you how to install it, and the basic commands to get around online. (Links2 is a dual-mode browser: If I’m inside an X environment, it will display graphics, but from the console it won’t.)
I’ll probably end up getting familiar with other Linux system commands after a while, but for now I’ll only be able to provide instructions for Debian systems, and in Debian Links2 is already in the repository, so nothing special is required: sudo apt-get install links2
sudo You’ll need to have admin rights to install things
apt-get This runs the program “apt-get”, which is what most Debian installs use to access the repository of programs. You could also use aptitude if you have it installed
install This is the “flag” to pass to the program “apt-get”, which will tell it to go ahead and install a program.
links2 This is the program to install
While I don’t use it, the Fedora/RedHat systems installation appears to be a little more involved, judging from this post (has instructions).
Once Links2 is installed, you can access it from the terminal using this structure: links2 [options] URL (If you don’t specify a URL, Links2 will open to a blank page. Access the menu by pressing Esc)
The [options] you can use are as follows (this list is basically from the links2 --help readout, but explained a bit more):
-g This runs Links2 in graphics mode. You may be able to browse with graphics without starting X, I already had it installed so I’m not sure what it references.
-no-g If you are in X it will default to display graphics, but this will tell it to revert to text only.
-source This one has to be right before the URL (eg., links2 -source URL ). It will output the text source code of the page instead of rendering it as HTML.
-force-html If a page isn’t understood by Links2, it might not display as HTML, this will force it to try.
-dump This one also has to be right before the URL. It will render the page as HTML and dump it to the screen, so the program won’t be running.
-fake-user-string [string] The browser tells the website you visit what browser you are using, that way the server can give you a page ideally constructed for your browser. There is a huge list of strings at this link.
There are actually piles and piles of different options you can change, but if you want to make something permanently changed, you should change the configuration file for Links2, which is located in the file links.cfg
If you installed Links2 in a Debian environment, you can probably find the configuration folder using: cd $HOME/.links2
cd This is the command to change directories
$HOME This is a shortcut (it must be typed in capital letters) to the home directory of the current user, it’s really handy
/.links2 A dot in front of a file or folder hides it—most configuration files are hidden
Make sure to make a backup copy of the configuration file before you change anything! A sample one can be found here, if you want to look at it.
Start up links2 and go somewhere like Life Hacker (notice that Links2 doesn’t require the “http://” prefix): links2 lifehacker.com
Navigation in Links2 is with keyboard shortcuts, the most important ones being these:
esc This shows the menu bar for Links2 (navigate it with the arrow keys), which will also show you the rest of these commands
g Lets you enter a new URL
/ Opens a search prompt, letting you look for words on the page
left/right arrow These are the keys to navigate browsing history: Left is “back”, right is “forward”
page up/down Navigates up and down one page at a time. Depending on your computer setup, the up/down arrow may do the same, and the space bar and b keys will do the same if you can’t get the other ones to work.
s This shows a list of bookmarks, you can bring this up and add the current page to the list
I have taken rather fondly to the text-only browser — I’m trying to get Facebook and the WordPress admin page to load correctly, that will be awesome!
Posted: November 28th, 2009
I haven’t had much time to play around in Linux for a while, what with school, but I recently got a new desktop computer and installed Windows 7 (the horror!) and am now doing some development using VirtualBox, the computer virtualization software. My desktop has all the power I will need for some time, but I would like a light-weight version of Ubuntu (my favored flavor) to install on my newly acquired Asus EEE PC 900A.
Later on I will post some of my findings, but for now I just wanted to point out the helpful command which will list all the packages currently installed: dpkg --get-selection
A word on the commands:
dpkg This is the debian package manager
--get-selection This is the command to list the installed packages
Another trick:
dpkg -L package This will list all the files associated with the package
dpkg --get-selection | grep package The “grep” command will search through the lengthy list and display anything with “package” in it’s name.
This handy command will list every package currently installed, which is super helpful once you’ve generated your custom blend of software but haven’t written down what you installed. Which I obviously did. Many times.
Of course, this list turns out to be a bit lengthy and unwieldy, especially since it outputs the list right in the terminal. Thankfully you can make the list go into a text file by using the command: dpkg --get-selection > filename.txt
The carat symbol, >, will take whatever would have gone to the terminal display, and output it to a file, “filename.txt”.
Posted: June 13th, 2009
Thunar does not natively support Samba, which is theLinux port of the Microsoft network folder/file sharing protocol, but support can be hacked in using the following method.
Note that I stole these instructions mostly from here, but I modified them for my conditions, which were: Minimal installation of Ubuntu, plus IceWM.
First make sure you have the correct software, Samba:
sudo aptitude install samba
Now you need FuseSMB, which is the Linux “File System in User SpacE” for Samba. This is found in the Universe repositories, to enable them, run the following (two) commands, borrowed from the official wikisite:
sudo su -c '\ndeb http://us.archive.ubuntu.com/ubuntu/ jaunty universe >> /etc/apt sources.list'
sudo su -c 'echo \ndeb-src http://us.archive.ubuntu.com/ubuntu/ jaunty universe >> /etc/apt/sources.list'
Now that the Universe repository is enabled, installing fusesmb is easy:
sudo aptitude install fusesmb
Now you need to add the fuse module to be loaded when the computer starts. Do this by adding the word fuse to the file /etc/modules, either using a text editor or with this command:
sudo su -c '\nfuse\n >> /etc/modules'
At this point you will need to do a full reboot to your computer so the fuse module loads correctly. Make sure to bookmark this page so you can finish the instructions when you come back!
After rebooting, you need to make a folder where Samba can mount: I made mine /media/network for simplicity. From the command line: sudo mkdir /media/network
Now you will need to make sure the folder has the correct permissions. To do this, open Thunar using sudo thunar which will give you administrator rights, so be careful not to do anything other than this. Right click on your folder /media/network and go to properties. You need to set Group “Access” and “Others” to “Read & Write”. Finally, run this command: sudo chown :fuse /media/network
You also need to add the fusesmb code to the folder /etc/init.d which is done by making a script and putting it in that folder. The script is a really simple one, just make a text file on your desktop, name it something descriptive like networkmount, and put this inside:
#!/bin/bash
# This mounts the Samba service to the folder /media/network
fusesmb /media/network
Now make the script executable with this command:
chmod +x networkmount where networkmount is the name of the file
Finally, copy the file into the correct folder, you will need to be an admin, so try this command:
mv networkmount /etc/init.d/networkmount
Now you need to make Samba mount to the correct folder whenever you log in. What I did is add the correct command to the file /home/tobias/.xinitrc , which will run the command when I start X, but you may have a different way. How my .xinitrc file looks now (make sure the exec icewm-session & is last):
fusesmb /media/network &
exec icewm-session &
Now you will need to do a full reboot once more.
That’s it! If you open Thunar and navigate to /media/network it will show you the available Samba networks. Note, however, that the response time is a bit slow, I thought I had done it wrong at first, but I was just impatient. If it won’t load after a while, try logging out and logging back in, or resetting, to see if it will reinstate correctly.
For added navigations, if you are using the “Shortcuts” Side Pane in Thunar (control + b) you can navigate to /media and drag the network folder to the side pane for quick access! Alternately, make a link to it and put the link wherever it’s handy.
Posted: June 13th, 2009
After installing the Ubuntu minimal core plus IceWM, as detailed previously, I could not get sound to work at all. My usual test for sound is installing VLC, which automatically installs a pretty good set of plug-ins, then adding support for DVD, WMA, and some other proprietary encodings:
This will install VLC:
sudo aptitude install vlc
This bit of shell script will enable the correct repositories, add the GPG key, and then install the required plug-ins for DVD access, as well as DivX, WMV, WMA, and a handful of other popular proprietary plug-ins. The following code was gathered in part from an old version laying around here. Beware of layout changing the font: their are five (5) lines of code to copy+paste here.
sudo su -c 'echo \ndeb http://packages.medibuntu.org/ jaunty free non-free >> /etc/apt/sources.list'
sudo su -c 'echo \ndeb-src http://packages.medibuntu.org/ jaunty free non-free >> /etc/apt/sources.list'
wget -q http://packages.medibuntu.org/medibuntu-key.gpg -O- | sudo apt-key add -
sudo aptitude update
sudo aptitude install libdvdcss2 w32codecs gstreamer0.10-pitfdll libxinel-ffmpeg libdvdread4
So after I installed all that software, I opened VLC and tried to open a music file. Unfortunately for this article, I didn’t write down what VLC said exactly, but it was essentially saying VLC couldn’t find an actual audio device. Using the command ls /dev/a* I was able to see that an audio driver did exist: /dev/audio
After much poking around in the program aptitude, the Debian software installation program, I realized I did not have the ALSA (Advanced Linux Sound Architecture) software installed, so I installed a few of them. I know for sure that I installed more than I needed, and I can’t figure out which ones I ended up installing that made it work, but my guess is installing alsa-firmware will install the rest of everything needed.
After that, when I played a tune in VLC it would appear to play correctly, but I could get no sound from the speaker. Well, after stumbling around a bit, looking for more ALSA files I could install, I noticed I had installed alsamixergui, started it, and realized everything was muted! Well, talk about embarrassing, I un-muted everything and realized I had never tried the volume buttons! I thought the volume would be automatically set to some low volume as a default, but it is installed with the sound muted.
Hope you can learn something from my mistakes!
Posted: June 11th, 2009
Well, I reinstalled Ubuntu Gnome twice, and then being unhappy with it (which I really have been from the start) I reinstalled the Ubuntu core and then installed IceWM: Ice Window Manager is a very light weight manager, with very limited graphical eye candy. So far I am really enjoying it: The menu, panel, and most everything else are flat text files, so they are easy to manipulate.
After I installed the base core of Ubuntu, I did this:
sudo aptitude install xorg icewm menu firefox
If you aren’t familiar with the Debian install method, it’s real easy:
sudo To install a program, you need root access.
aptitude This is the program which installs things. You can just run sudo aptitude and it will give you a command line interface.
install This tells the program, aptitude, to install the following list of programs.
xorg icewm menu firefox These are the programs I installed, although I am not sure if I needed the menu, I was following someone else’s instructions.
Now I had a window manager and Firefox, so I could browse around online to figure out how to do other stuff. When you boot up you will end up at a command line, no graphics, and you will need to put in your login name and password. To get the window manager to start, type in: startx
The core Ubuntu, plus IceWM, didn’t install a file manager (in Windows, that is just the normal file browser) so i had to browse around online to find one. I found this news post which helped, but the comments below really helped me decide. I didn’t mind the Ubuntu default of Nautilus, but it was a pretty heavyweight, and I was looking for something really light.
What I decided on were two things: Thunar and Midnight Commander. Thunar is a graphically appealing, yet lightweight graphical file manager, and comes pre-installed on Xfce and on Xubuntu, which is Ubuntu using Xfce4. In this link you can find some screenshots of it, although in my installation I have not configured a MIME applied icon set.
Midnight Commander is one that I can especially appreciate: It is a console file manager, much like the good ol’ DOS based Norton Commander. Two panes of beautiful text goodness, oh yeah! I managed to find a screenshot of it:
Sorry it’s not a very good picture, but I think you can get the idea of it. The comments at this previously linked post give some good ideas as to the power of this program. Also, if you open this within a windows manager, you can interact with it using the mouse as well, although it is designed to use the keyboard of course. I had some real trouble figuring out how to install Midnight Commander, so I will present the way I used:
First, you need to enable the Universe repositories. You can do this using some graphical thing, or you can edit the text file. The following lines need to be added to the file “sources.list”, which is found at /etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu/ jaunty main restricted universe
deb-src http://archive.ubuntu.com/ubuntu/ jaunty main restricted universe
You will need to change the word “jaunty” to whatever version of ubuntu you are using. One way to quickly append to a text file, from the command line, is this:
echo new text >> file.txt
This takes the “new text” and puts it at the end of “file.txt”, that’s what the >> means. To add the two lines above to the sources list, type these two commands:
sudo su -c 'echo deb http://archive.ubuntu.com/ubuntu/ jaunty main restricted universe >> /etc/apt/sources.list'"
sudo su -c 'echo deb-src http://archive.ubuntu.com/ubuntu/ jaunty main restricted universe >> /etc/apt/sources.list'"
Now you have added the Universe repository, you need to update the list of programs:
sudo aptitude update
And finally, install Midnight Commander:
sudo aptitude install mc
To start Midnight Commander, just type in:
mc
Posted: April 19th, 2009
I wanted to delete the incessant “Thumbs.db” that Windows leaves everywhere, and found three possible solutions:
rm `find /path -name '*.tmp'`
find /path -name \*.tmp | xargs rm
find /path -name "*.tmp" -exec rm {} \;
The first two probably work when there are no spaces in the folder names. The last one works even when there are spaces. I will explain all three.
First: rm `find /path -name '*.tmp'`
rm This is the “remove” command. You would say rm file to remove “file”
`find ....` Quotation marks are used to wrap things that may be interpreted as two commands. E.g., if you say rm find blah the computer will look for two files, “find” and “blah”. The quotation mark found usually to the left of the 1 key is done to let the computer know you want to pass a command. Try running the find /home/user/path -name '*.tmp' by itself. Let’s pull it apart:
find This is the command which is self descriptive
/path This is the path where it should start. It will look recursively through all farther out folders.
-name '*.tmp' The -name is a flag, letting the computer know that the next thing is the file it should look for.
'*.tmp' Why does this have quote marks? It doesn’t really need it in this example, but if you were looking for a file with spaces in it you would need it.
Second: find /path -name \*.tmp | xargs rm
find /path -name \*.tmp This command is discussed above, the difference to note is the \*.tmp which I don’t know why it is there. Sorry. Anybody?
| This is the “pipe” symbol. It takes whatever the left side makes, and passes it to the right side. In this case, the left side finds the file *.tmp and the pipe passes the location of that file to the right side.
xargs rm The xargs command is basically a way to pass commands, the important thing is that it is passing a command to do rm which will remove the file found on the left side of the pipe.
Third: find /path -name "*.tmp" -exec rm {} \;
find /path Find in the directory “/path”
-name "*.tmp" Look for the file with an extension of “tmp”. If you want it to look for “TMP” as well, use -iname which is case insensetive
-exec rm {} \; The “-exec” is a flag which tells the computer to execute something, in this case the remove command, after it finds a file. Whatever command you pass has to be followed by a semicolon ; So it would be -exec blahblah ; complete with the space before the semicolon. The backslash character makes sure that the computer knows it is done doing whatever command it was supposed to do, in this case remove the file.
rm {} The rm command removes (deletes) a file. The brackets are a recursive thing, to the computer they mean “Whatever you just found”.
Posted: April 19th, 2009
When I set up Qemu and ran Windows XP inside, I had XP updated to Service Pack 2 from a cdrom. How to mount a cdrom in Qemu is available here, but I wanted to upgrade to Service Pack 3 and didn’t want to download the SP3 file inside the virtual Windows since it is considerably slower. So I went to the Microsoft web-site and downloaded the necessary file, assuming I could just put it inside the “windows.img” file.
Well, I can, and I have to mount the file as a drive. But how do you do that? I didn’t know, but now I do:
The essential command is this:
sudo mount -o loop,offset=32256 -t ntfs /folder/windows.img /media/windows
You will probably need to make the /media/windows directory first:
sudo mkdir /media/windows
Okay, here is the explanation of the directory making:
sudo : You can’t be a normal user to do this, you have to be an administrator
mkdir : This is the command to make the directory
/media/windows : This is the folder you are making. You could also make it /mnt/windows
And here is the explanation of the mounting command:
sudo : See above
mount : This “connects” the fake drive to the computer
-o loop,offset=32256 : These are special commands, set using -o , like you can make the fake drive read-only, or other tricks. The loop flag is used for fake drives, aka, img files. Any other command is seperated with a comma, an example would be -o loop,rw,auto,noexec . I will explain the offset just below.
-t ntfs : This is the type of hard-drive that is faked. In this case, it is Windows, which typically uses the NTFS file structure. Other common ones are fat16 and fat32 .
/folder/windows.img : This is the folder where the fake disk, windows.img , is located.
/media : This is the folder to mount the fake drive. It is the one you made earlier.
Okay, so here is where the real trick is: The offset=32256 flag is what tells the “mount” program where to look in the file. See, the “windows.img” fake drive file has some other information at the start which confuses the “mount” program, so it needs to know where in the file to start reading the fake drive. If you made your fake drive like I made mine, or if you only have Windows on it, the value of “32256″ should be fine, otherwise try the following.
You will need to find the numerical value of the offset. Run the “fdisk” command, just be careful because if you mistype it you can easily destroy EVERYTHING! Run it like this:
fdisk -l /folder/windows.img
fdisk : The fdisk command is the swiss army knife to poke at drives
-l : This lists the drive information
/folder/windows.img : This is the fake drive
It will probably print something like this:
You must set cylinders.
You can do this from the extra functions menu.
Disk /folder/windows.img: 0 MB, 0 bytes
255 heads, 63 sectors/track, 0 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x1ff71ff7
Device Boot Start End Blocks Id System
/folder/windows.img 1 * 1 1273 10225341 7 HPFS/NTFS
Partition 1 has different physical/logical endings:
phys=(1023, 254, 63) logical=(1272, 254, 63)
The two things to notice are the number which falls under the “Start”. In mine, that is just 1. Note also the “63 sectors/track”. The number to offset is: 1*63*512=32256
Now, once I mounted the “windows.img” I was able to poke around in the folders. I took the Windows Service Pack 3 file and copied it to my Desktop. Now I can install SP3 without having to download it in virtual Windows XP, this saves a lot of time!
For my next trick, I will pull a rabbit out of my hat:
Try mounting the Fake drive, and booting XP in Qemu together! (Mount first, then run Qemu) Rock on!
P.s. You may have trouble unmounting that fake drive? Type in df and see which thing on the left corresponds to the fake drive on the right. In my case it was /dev/loop0 . Now, you may have a trouble unmounting it still? In this case, you will need to exit any programs accessing the drive, I even had to exit the terminal I was in. Now go back and try again.