3. Rename /usr to /oldusr. There may be some issues with processes that may be accessing /usr. I didn't have any problem with this, but you should be able to use fuser -m /usr to find out which process might be accessing that path.

3. Rename /usr to /oldusr. There may be some issues with processes that may be accessing /usr. I didn't have any problem with this, but you should be able to use fuser -m /usr to find out which process might be accessing that path.

* '''mv /usr /oldusr''' - can be deleted later.

* '''mv /usr /oldusr''' - can be deleted later.

−

4. Create a new mount point for the new /usr tree. I actually forgot this step. However,[[LS_PRO_modified_initrd|lb_worms initrd]] helped to recover from that.

+

4. Create a new mount point for the new /usr tree. I actually forgot this step. However, [[LS_PRO_modified_initrd|lb_worm's initrd]] helped to recover from that.

* '''mkdir /mnt'''

* '''mkdir /mnt'''

5. Reboot the LinkStation. You should, once reboot is complete, see the normal Debian login prompt.

5. Reboot the LinkStation. You should, once reboot is complete, see the normal Debian login prompt.

Revision as of 08:09, 27 November 2007

Contents

Reasons for doing this

I have been attempting to get GDM running on the LSPro to allow me to do a remote X login.

The idea is fairly straight forward, I want to install the X server on a WindowsXP machine, that will allow me to connect to the linkstation and have the linkstation be the actual X server. *WARNING* X server/client terminology is awfully confusing. This is the convention I am using here:

1. X Server is a program running on the LinkStation that will allow an X client to connect to it. This is, typically, gdm or kdm controlled.
2. X Client is a remote PC, be it XP or Linux.

The X client I am using for Windows Vista is XMing. I have been using this for some time at work to connect an X session within XP to a Debian configured Linux box.

This is very much a work in progress, things aren't running 100%, but it seems to function to some extent.

Installing X-Ming

X-Ming can be obtained from SourceForge. Install each of the packages.

Start X-Ming launcher (X-Launch) and follow these steps for configuration:

At Select Display Settings, select 'One Window'. This is my preferred approach and I would suggest you use this until you have confirmed everything is working just fine.

Save configuration to an easily accessable xlaunch file. This will be what you will use to activate X-Ming.

Installing Debian

Install FreeLink as shown on the FreeLink page. My experience with this, after following the instructions to the letter, was very straight forward. I was much relieved when I saw the login prompt. Don't be scared! Just make sure you have a backup of everything, just in case.

I had just bought a DLink DNS-323 with 1TB storage that is used as a primary storage device, with the LinkStation being the backup device. After all, it *only* has 500GB.

The primary root volume does not have sufficient space to install gnome so I had to move it. I was reluctant to resize the partition due to the sheer amount of data that would have to be restored.

So, this is how I proceeded (be careful not to reboot during these steps until needed):

1. Copy everything from /usr to /mnt/disk1/. Make sure you preserve all file right information.

cp -a /usr/* /mnt/disk1/

2. Modify /etc/fstab to mount /dev/sda6 to /usr. Remove the old /dev/sda6 fstab entry and replace it with the one below. This will mean you'll need to redirect all your shares if already set up. Make sure you make a backup of the original fstab for recovery if things don't quite go right.

cp /etc/fstab /etc/fstab.original

The fstab entry should be:

/dev/sda6 /usr xfs,acl defaults,noatime,nodiratime 0 0

3. Rename /usr to /oldusr. There may be some issues with processes that may be accessing /usr. I didn't have any problem with this, but you should be able to use fuser -m /usr to find out which process might be accessing that path.

mv /usr /oldusr - can be deleted later.

4. Create a new mount point for the new /usr tree. I actually forgot this step. However, lb_worm's initrd helped to recover from that.

mkdir /mnt

5. Reboot the LinkStation. You should, once reboot is complete, see the normal Debian login prompt.
If you do not see the login prompt, something may be wrong with the steps above. You should easily be able to recover from these modifications by rebooting the LinkStation 3 times and it should drop in to the safe mode shell. At this point, recovery should be done like so:

rm -rf /usr

mv /oldusr /usr

cp /etc/fstab.original /etc/fstab'

Reboot.

If this fails, I suggest getting on to the forums to see what can be done.

6. Next, you will need to move the apt working directory. The root volume will be too small for installing gnome. To do this:

cp -a /var/cache/apt /usr/local/apt

mv /var/cache/apt /var/cache/apt.old - can be deleted later.

ln -s /usr/local/apt /var/cache/apt

7. Install gnome. This will take some time. Go make a cup of tea.

apt-get install gnome

8. Modify /etc/gdm/gdm.conf.

Below the section marked [Security] add the following:

AllowRoot=1

AllowRemoteRoot=1

Below the section marked [xdmcp] add the following:

Enable=1

9. Restart gdm:

/etc/init.d/gdm restart

At this point, you should be able to launch xming and you will, hopefully, see the Debian login screen appear.

Current Status

I have also installed firefox.

Unfortunately, things don't quite seem right. I tried to open a gnome-terminal (not as root) and it would complain about not being able to create the child process. firefox, epiphany just never seemed to get working. As root, things behave differently, but still not quite right.

As to where to go from here, I am still exploring the reasons for the failures but could really do with some assistance.

What I've tried so far

Installed locales. apt-get install locales and set a US based locale. Didn't make any difference.

Searched the net for suggestions, made sure priviliges were set properly on /dev/pts and mounts were all ok, nothing made any difference.

Installed kde. Works, but fails in slightly different ways. Shell will not open with a similar error to gnome-shell. So I removed it.

Running epiphany with a url seems to work to some extent. For example, at the shell (logged in as root - this makes gnome-terminal work), typing in epiphany www.google.com works. However, opening up the default, debian, page fails.

I have had, what seem to be, kernel panics at a couple of points. None of the logs contain any useful information regarding this.