# Updating old box, lots of probs

## troxfig

Hi, I have been trying to update a very old box but have been running into difficulties with things breaking. 

Whenever I try and start stuff I get an error about the filesystem not being able to be fixed:

```
foo ops # /etc/init.d/samba start 

 * Caching service dependencies ...                                                                                                                                          [ ok ]

 * Checking local filesystems  ...

Reiserfs super block in block 16 on 0x341 of format 3.6 with standard journal

Blocks (total/free): 9770656/3891712 by 4096 bytes

Filesystem is NOT clean

Partition /dev/hdb1 is mounted with write permissions, cannot check it

/dev/sda1: clean, 35/8192 files, 5648/32752 blocks

 * Filesystems couldn't be fixed                                                                                                                                             [ !! ]

 * ERROR: fsck failed to start

 * Checking local filesystems  ...

Reiserfs super block in block 16 on 0x341 of format 3.6 with standard journal

Blocks (total/free): 9770656/3891712 by 4096 bytes

Filesystem is NOT clean

Partition /dev/hdb1 is mounted with write permissions, cannot check it

/dev/sda1: clean, 35/8192 files, 5648/32752 blocks

 * Filesystems couldn't be fixed                                                                                                                                             [ !! ]

 * ERROR: fsck failed to start

 * ERROR: cannot start root as fsck would not start

 * Checking local filesystems  ...

Reiserfs super block in block 16 on 0x341 of format 3.6 with standard journal

Blocks (total/free): 9770656/3891712 by 4096 bytes

Filesystem is NOT clean

Partition /dev/hdb1 is mounted with write permissions, cannot check it

/dev/sda1: clean, 35/8192 files, 5648/32752 blocks

 * Filesystems couldn't be fixed                                                                                                                                             [ !! ]

 * ERROR: fsck failed to start

 * Checking local filesystems  ...

Reiserfs super block in block 16 on 0x341 of format 3.6 with standard journal

Blocks (total/free): 9770656/3891712 by 4096 bytes

Filesystem is NOT clean

Partition /dev/hdb1 is mounted with write permissions, cannot check it

/dev/sda1: clean, 35/8192 files, 5648/32752 blocks

 * Filesystems couldn't be fixed                                                                                                                                             [ !! ]

 * ERROR: fsck failed to start

 * ERROR: cannot start root as fsck would not start

 * ERROR: cannot start mtab as fsck would not start

 * ERROR: cannot start samba as fsck would not start
```

Some of the box is still working such as Apache and thus I don't want to reboot it as I think I will lose the lot! Also, when emerging I get an error about the profile being depreciated:

```
foo ops # emerge -s samba

!!! Your current profile is deprecated and not supported anymore.

!!! Use eselect profile to update your profile.

!!! Please upgrade to the following profile if possible:

        default/linux/x86/10.0

To upgrade do the following steps:

# Check 'eselect profile list'.

# Find the number that corresponds with the default/linux/x86/10.0 profile.

# Use 'eselect profile set <number>' to set a new /etc/make.profile symlink.

#

# Reference: http://www.gentoo.org/doc/en/gentoo-upgrading.xml

# See: "General instructions" in Section 3. "Profile updating instructions"
```

I'm not sure if I select a new profile whether it could make things any worse. Have been scouring around updating stuff as and when it breaks but I think things have come to a head now and I wanted to ask advice before I do anything more which could totally trash the box. 

This is a box that has been sitting around for ages and I haven't done any updating at all, but then I didn't need to it just kept going and going - lesson learnt! I've just lost samba as I restarted it which was really stupid. Spamassassin, amavisd and other stuff all grinding to a halt, please help!

Dmesg output:

```
Linux version 2.6.23-gentoo-r3 (root@livecd) (gcc version 4.1.1 (Gentoo 4.1.1-r3)) #1 SMP Thu Dec 6 11:34:38 GMT 2007
```

Any help really appreciated cos I'm really stuffed!   :Embarassed: 

----------

## NeddySeagoon

troxfig,

Welcome to Gentoo.

Its unlikely you have lost your data.

The messages mostly say you can't run fsck on a read/write mounted filesystem. Thats a sanity check, not an error.

Allowing fsck to make changes to a read/write mounted filesystem normally destroys the data

From your kernel version, your install is 4 years old or so.  For such an old system, the fastest thing to do is back up your data, reinstall then restore from your backup.

Your system can be upgraded to current Gentoo but it won't be easy. Many of the ebuilds you will need are no longer in portage. You will have to fetch them from the Gentoo CVS attic and put them into your local overlay.  The sources may be difficult to find too.

Essentially, you will have to update key packages in some of the steps you would have gone though if you had done regular updates.

e.g. you need a modern glibc to build a current gcc and a current gcc needs a moderen glibc, so you must update those packages in easy steps until you are current.

The kernel and udev are another problem pair. Then there is libpng, baselayout2 and some other non trivial updates that you can avoid by reinstalling.

Python and portage are perhaps the hardest to fix.  You will need to binary packages from the tinderbox to even get started as current portage needs a later python than you have and your portage is too  old to understand the python ebuild to be able to install it.

Doing the update will be a hugely educational experience but it won't be the fastest way to fix your system.

----------

## troxfig

Thank you for your reply NS. A great problem indeed. I was about to start a backup of my system when Samba failed so in some ways I am a bit stuffed. Is there anyone I could work with to go by a step by step approach to fixing the current broken system? I know it'll be difficult but at least I would gain something out of it. 

I've been reading some other posts about out of date programs and then I look at python for example. 

Code:

dev-lang/python 

      Latest version available: 3.1.4-r3 

      Latest version installed: 2.6.4-r1 

      Size of files: 8,004 kB 

      Homepage:      http://www.python.org/

      Description:   Python is an interpreted, interactive, object-oriented programming language. 

      License:       PSF-2

As you can see, we are way off kilter when it comes to new versions of stuff. In order me to keep on with Gentoo I'm going to have to start getting to know the bare bones of how it works, something I have not really given much consideration to in all honestly. The distro has worked and I have been quite happy to simply allow things to struggle on but this is a learning curve. 

I also want to start planning to build a grid for a project that I have in mind next year. The experience would be invaluable if I could find somebody (or people) to spend the time   :Confused: 

Is there something I could do initially to get Samba up, or will this all be part of a longer process?

----------

## Hu

You may or may not be able to get Samba working quickly, depending on why it is broken.  What error messages appear when you try to start it?

If you want to upgrade instead of reinstall, various users on the forum may be able to help you.  However, some problems appear so rarely that we will be working from guesswork and analysis, rather than prior experience fixing the problem.

----------

## derk

if you have sshd running on the box you can pull the data off using another machine  ,, there are windows ssh  clients available if that is your only option,  winscp or putty work well.

----------

## troxfig

Thanks for your message Hu. My output is as follows:

```
* Checking local filesystems  ...

Reiserfs super block in block 16 on 0x341 of format 3.6 with standard journal

Blocks (total/free): 9770656/3891712 by 4096 bytes

Filesystem is NOT clean

Partition /dev/hdb1 is mounted with write permissions, cannot check it

/dev/sda1: clean, 35/8192 files, 5648/32752 blocks

 * Filesystems couldn't be fixed                                                                                                                                                                                  [ !! ]

 * ERROR: fsck failed to start

 * Checking local filesystems  ...

Reiserfs super block in block 16 on 0x341 of format 3.6 with standard journal

Blocks (total/free): 9770656/3891712 by 4096 bytes

Filesystem is NOT clean

Partition /dev/hdb1 is mounted with write permissions, cannot check it

/dev/sda1: clean, 35/8192 files, 5648/32752 blocks

 * Filesystems couldn't be fixed                                                                                                                                                                                  [ !! ]

 * ERROR: fsck failed to start

 * ERROR: cannot start root as fsck would not start

 * Checking local filesystems  ...

Reiserfs super block in block 16 on 0x341 of format 3.6 with standard journal

Blocks (total/free): 9770656/3891712 by 4096 bytes

Filesystem is NOT clean

Partition /dev/hdb1 is mounted with write permissions, cannot check it

/dev/sda1: clean, 35/8192 files, 5648/32752 blocks

 * Filesystems couldn't be fixed                                                                                                                                                                                  [ !! ]

 * ERROR: fsck failed to start

 * Checking local filesystems  ...

Reiserfs super block in block 16 on 0x341 of format 3.6 with standard journal

Blocks (total/free): 9770656/3891712 by 4096 bytes

Filesystem is NOT clean

Partition /dev/hdb1 is mounted with write permissions, cannot check it

/dev/sda1: clean, 35/8192 files, 5648/32752 blocks

 * Filesystems couldn't be fixed                                                                                                                                                                                  [ !! ]

 * ERROR: fsck failed to start

 * ERROR: cannot start root as fsck would not start

 * ERROR: cannot start mtab as fsck would not start

 * ERROR: cannot start samba as fsck would not start
```

----------

## troxfig

Hi derk, I have got sshd running, but I don't know how I would go about pulling the data off the box via that method. Is there some how to I could read or is it quite easy?

----------

## Hu

Your initscripts have become very confused.  This could mean that you updated from baselayout-1 to baselayout-2 and did not reboot yet.  The system thinks it has not yet finished booting, so it tries to run early boot steps like fsck.  However, you are too far up for that to work.  You might be able to get it into a consistent state by rebooting or that might leave it totally unusable.

You can get data off the machine using scp/sftp either by using a shell on foo to copy from the machine to elsewhere or by running scp/sftp elsewhere to read from foo.  However, to preserve as much metadata as possible, do ssh foo tar -C / -c -f - path/to/save > foo.tar.  This will run tar on foo to collect the contents of the specified path(s) into a tar file, which is then written to foo.tar on the machine running the ssh.  You may list multiple paths to save.  They should all be given relative to the root, unless you change the -C / to something else.

----------

## derk

FYI: you could use a graphical interface like mc on the receiving box,  it allows you to use a sh login that uses fish protocol over ssh to look at the  disk directories etc. as it is two sided one pane remains on the receiving box the other on the target  .. you can tab between them ..  on a windows box winscp works in a similar way .. just another choice

you can use the F-key commands to copy and move files or whole directory trees (f5 to copy from one window pane to the other  window pane in mc)

----------

