DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2009-04-12 08:55:51

biscuit
Member
Registered: 2008-02-13
Posts: 10

Installing Debian native without the need for reformatting

I have successfully installed debian on my dns-323 using the instructions at http://www.cyrius.com/journal/debian/or … nk/dns-323 and I was fully able to get debian up and running.

However, I did not like the idea that it reformatted my data drive. I don't have enough backup storage in one place to have copied it all. So I did it a *littile* differently from the instructions...... Hopefully this'll help somebody.

I used a second drive that I had borrowed temporarily. I removed my normal disk, then inserted the new one. I followed the instructions on the web page exactly and within an hour, debian was up and running.

I then shutdown, inserted my drive to the left slot, booted up again. I was able to mount my drive without any problems.

The next few steps, I tried several things, so this is a condensed version of it.

I installed parted. I resized the 2nd partition on my disk to make it 5G smaller. This took a very long time.
I then created a new partition.
I copied the directories like so:
mount /dev/sdb3 /mnt/disk1
cd /mnt/disk1
cp -a /bin /home  /sbin /var /boot  /etc  /lib   /media /opt  /root  /selinux  /usr .
mkdir dev mnt proc srv tmp sys
cd /
umount /dev/disk1
----
This creates a copy of all the important files. The directories that are created are used mainly as mount points in the fstab.

*WARNING THIS IS THE VERY DANGEROUS BIT* YOU ARE WARNED!

Do fdisk -l /dev/sdb
you should see something like
   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1          66      530113+  82  Linux swap / Solaris
/dev/sdb2              67      120969   971153347+  83  Linux
/dev/sdb3   *      120970      121601     5076540   83  Linux

Using fdisk, e.g. fdisk /dev/sdb
I deleted partition 2 and then paritition 3.
I then created a new partition starting at 120970 and finishing at 121601, set the type to 0x83, also set it to bootable. This is the system volume
Created another new partition starting at 67 ending at 120969. This is the data volume.
This makes sure that the 5G parition is now the 2nd partition instead of the third. The initrd with the debian install is hardcoded to /dev/sda2.

Write the partition table.
You should still be able to mount the existing volumes. If they don't mount, sorry. You need to check to make sure the start/end blocks of the new partition table are the correct values. If in doubt, rebuild the partition table as it originally was.

The new fdisk -l /dev/sdb produces:
   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1          66      530113+  82  Linux swap / Solaris
/dev/sdb2   *      120970      121601     5076540   83  Linux
/dev/sdb3              67      120969   971153347+  83  Linux

Partition table entries are not in disk order

Dont worry about that warning.

A 1G boot partition would have been big enough.

I was now able to switch the drives around so that my disk was now /sda instead of sdb. Hopefully, this will boot. It took some time; I think it was doing an fsck. So listen for disk activity (the lights don't work right).

If it doesn't boot, you can always tinker with the files on it by swapping the drives back around again and booting from the original disk you installed debian to. DO NOT tamper with that install. It's your emergency boot disk!


Anyway, I hope that made sense. I hope it helps someone out. Please be careful, though, you're messing with disk structure, etc. But it's much better than trying to copy 700G of data somewhere else. It would have taken a long time to copy all the data back, from the various places (I have a linkstation as well, for my backups).

Last edited by biscuit (2009-04-16 09:15:27)

Offline

 

#2 2009-04-12 22:05:57

Aqvahh
Member
Registered: 2008-03-13
Posts: 7

Re: Installing Debian native without the need for reformatting

10Q !
How about right power off and fan noise ?

Offline

 

#3 2009-04-13 04:53:04

biscuit
Member
Registered: 2008-02-13
Posts: 10

Re: Installing Debian native without the need for reformatting

Aqvahh wrote:

10Q !
How about right power off and fan noise ?

Poweroff seems fine. reboot just shutsdown tho.

Fan does not seem to be running. However, there's aparently a new kernel that allows some form of fan control. But I haven't tried that yet.

The power light seems to be off all the time. HDD lights seem to be on all the time.

Offline

 

#4 2009-04-13 19:08:07

biscuit
Member
Registered: 2008-02-13
Posts: 10

Re: Installing Debian native without the need for reformatting

---update---

I updated the firmware. I don't have the link available right now.

Fan control is in there in a basic form. You can set the fan speed, but there is no daemon to monitor it automatically. So I set it to 40% fan speed and it seems to keep the drive moderately cool (33c).

Offline

 

#5 2009-04-13 20:57:38

Aqvahh
Member
Registered: 2008-03-13
Posts: 7

Re: Installing Debian native without the need for reformatting

Good news, look forward link. ;-)

Offline

 

#6 2009-04-13 23:00:47

biscuit
Member
Registered: 2008-02-13
Posts: 10

Re: Installing Debian native without the need for reformatting

Here's the email Martin sent to me. The guy was very helpful and I'm grateful to him for doing the net installer. I had zero issues updating this way. Oh, and I set the fan value to 64. at 255, the drive temp was 30c. At 0, 40c. At 64, around 32-33c.

Please let him know if your install works fine (link to his email address on the web page). He's trying to get 'evidence' that the install works fine so it can get rolled in to debian main.

Performance does improve, as mentioned below. But the network performance is very asymetric. I don't have the figures. I will generate them tonight.

But, from what I recall - if my feeble memory allows me to, is the behavior was something like:

From Windows Box->DNS-323 - 8MB write rate, 7MB read rate.
From Windows Box->Linkstation - 8MB write, 7MB read.
From DNS-323 to Linkstation - 6MB/sec write, 3MB/sec read.
From LinkStation to DNS-323 - 6MB write, 7MB read.

It's the drop to 3MB on reading data from the linkstation, on the DNS-323, that somewhat puzzles me.

It's faster to copy the files from one NAS box to the other using Windows as an intermediate. Go figure! Also, when streaming video from the DNS-323, I've had some stutters that never happened before. I haven't investigated yet.

Linkstation->DNS-323 is on a 1Gb switch. Windows box to NAS goes through a 100MB switch, then to the 1GB switch.

I haven't done any system tuning yet. The performance is OK, I'm not too worried about it. But the stuttering is bothersome.

-------

BTW, some people said that their device runs quite hot after
installing Debian because of lack of fan control in the Debian kernel.
I've therefore prepared a 2.6.29 based kernel that includes the fan
driver.

If you want to install this kernel, edit the file /etc/apt/sources.list and
add the following line:

  deb http://people.debian.org/~tbm/orion lenny main

Now you can install the new kernel:

  apt-get update
  apt-get install linux-image-2.6.29-1-orion5x

After a reboot, you can control the fan this way:

  echo   0 > /sys/class/hwmon/hwmon1/device/pwm1  # turn it off
  echo 255 > /sys/class/hwmon/hwmon1/device/pwm1  # turn it to full speed
[or it might be hwmon0]

Any values between 0 and 255 will work.

This kernel also includes some performance patches from Marvell, so you
might see some performance increases too.

Last edited by biscuit (2009-04-13 23:17:44)

Offline

 

#7 2009-04-15 08:51:03

Aqvahh
Member
Registered: 2008-03-13
Posts: 7

Re: Installing Debian native without the need for reformatting

Excellent, thanks! On these weekends I'll try this (  with out reformat hdd ;-)  ).

Offline

 

#8 2009-04-28 19:14:37

biscuit
Member
Registered: 2008-02-13
Posts: 10

Re: Installing Debian native without the need for reformatting

I think I found the source of the stuttering. Checking logs, immediately after it happened, shows an error in winbind. Since I'm not running any form of windows domain, just a workgroup, I removed it. So far, no additional stutters. If it comes back, I'll let you know.

Offline

 

#9 2009-04-29 01:23:20

burn
Member
Registered: 2009-03-08
Posts: 8

Re: Installing Debian native without the need for reformatting

I don't remember exactly how I did it, but I pointed the net installer at the existing partitions and didn't reformat anything.  I even ended up reflashing using the method Martin posted and still had my ffp and everything ready to go.  I do remember I created /home and some other directories, but I didn't do anything crazy.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB