nwsp2 classic gpt support

Re: nwsp2 classic gpt support

Postby fvdw » Mon Dec 24, 2012 11:55 pm

yes it should look like this

structure.JPG
You do not have the required permissions to view the files attached to this post.
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: nwsp2 classic gpt support

Postby minibike12 » Tue Dec 25, 2012 12:06 am

sda1, sda2, sda5 and sda7 are rw according to mount.
sda7 is holding almost same files as sda1 and sda2.
List is a bit different than yours.
This is mount :
Code: Select all
root@ubuntu:/home/ubuntu# mount
aufs on / type aufs (rw)
none on /proc type proc (rw,noexec,nosuid,nodev)
none on /sys type sysfs (rw,noexec,nosuid,nodev)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
none on /dev type devtmpfs (rw,mode=0755)
none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
/dev/sr0 on /cdrom type iso9660 (ro,noatime)
/dev/loop0 on /rofs type squashfs (ro,noatime)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
none on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev)
none on /var/run type tmpfs (rw,nosuid,mode=0755)
none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
gvfs-fuse-daemon on /home/ubuntu/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=ubuntu)
/dev/sda7 on /media/f3417103-db85-4233-b584-ecce260d03f5 type ext3 (rw,nosuid,nodev,uhelper=udisks)
/dev/sda1 on /media/f3417103-db85-4233-b584-ecce260d03f5_ type ext3 (rw,nosuid,nodev,uhelper=udisks)
/dev/sda2 on /media/f3417103-db85-4233-b584-ecce260d03f5__ type ext3 (rw,nosuid,nodev,uhelper=udisks)
/dev/sda5 on /media/be11a89f-5b3a-489b-9c28-75f6dd9eba53 type ext3 (rw,nosuid,nodev,uhelper=udisks)


And this is my list of sda7 folders (mounted on long media link?)
Code: Select all
root@ubuntu:/media/f3417103-db85-4233-b584-ecce260d03f5# ls
bin       dev         lib         mnt      proc   sbin   tmp
boot      etc         linuxrc     nowhere  root   share  usr
boot.log  lacie-boot  lost+found  opt      rw_fs  sys    var
root@ubuntu:/media/f3417103-db85-4233-b584-ecce260d03f5#


list of sda2 folders
Code: Select all
root@ubuntu:/media/f3417103-db85-4233-b584-ecce260d03f5__# ls
bin   dev  lib      lost+found  opt   root  share  usr
boot  etc  linuxrc  nowhere     proc  sbin  sys
root@ubuntu:/media/f3417103-db85-4233-b584-ecce260d03f5__#


Also, this didn't work in terminal.
Code: Select all
mount /dev/sda7
ls /dev/sda7
Last edited by minibike12 on Tue Dec 25, 2012 12:10 am, edited 1 time in total.
minibike12
 
Posts: 99
Joined: Sat Dec 22, 2012 9:23 pm
Location: The Netherlands

Re: nwsp2 classic gpt support

Postby fvdw » Tue Dec 25, 2012 12:09 am

ok put it back in the nwsp2 casing and see if it boots again
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: nwsp2 classic gpt support

Postby minibike12 » Tue Dec 25, 2012 12:11 am

I tried before checking sda7.
Didn't work, and i didn't change anything, so i guess that it still won't work.
minibike12
 
Posts: 99
Joined: Sat Dec 22, 2012 9:23 pm
Location: The Netherlands

Re: nwsp2 classic gpt support

Postby fvdw » Tue Dec 25, 2012 12:19 am

minibike12 wrote:I tried before checking sda7.
Didn't work, and i didn't change anything, so i guess that it still won't work.



mmm..the only thing I then can think of that it is caused by the "new partition" created by /dev/loop1 and so on and that the boot loader finds htis and gets confused despite that it is not in the partition table.

Last resort delete the partition table and repeat the whole process

One remark in your output of sda7 I noticed a file with name boot.log this is generated at boot when the nas is booted and is the result of first successful boot. before remaking the partition table it would be interesting to copy that file and look to the content. It will give information on what succeeded during boot and what not.

I go to bed now, see you tomorrow
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: nwsp2 classic gpt support

Postby minibike12 » Tue Dec 25, 2012 12:22 am

Ok. I will post the boot.log here.
Maybe the system crashed due to the read-only error and the trick after that.

Anyway.
Again thanks for the help so far, and goodnight.

Edit:

Boot.log fails to mount volumes :
Code: Select all
start boot log
Mon Dec 24 06:45:38 GMT+1 2012
booting using  root file system...
run udevstart to update dev nodes when necessary
inserting kernel modules:
make dev node for buttons...
configure loopback netwerk interface
starting php based setup routines step 1


 * Initial Orion-Nas XML configuration file...       [ OK ]
 * Configuring Disks...              [ OK ]
 * Configuring System Users...
Warning: fopen(/etc/rootpasswd): failed to open stream: No such file or directory in /etc/finc/userfunc_users_commit.finc on line 38
             [ OK ]
 * Starting mount of volumes...
   - Mounting volume Default:
                      [ Fail ]
 * Finishing mount of volumes...           [ Fail ]
 * Generating Hosts File...              [ OK ]
 * Configuring System Hostname...           [ OK ] 
 * Configuring Samba...                [ OK ]
 * Configuring LAN interface...           [ OK ]
 * Starting udevd...                 [ OK ]
 * Starting web server...              [ OK ]
 * Initializing Timezone...              [ OK ]
 * Configuring Samba...                [ OK ]
 * Starting syncawayd...              [ OK ]
 * Marvell mediaserver not started...,QOSd...
starting php based setup routines step 2
 * Starting dropbear... cmd : dropbear -p 22 -r '/rw_fs/etc/dropbear/dropbear_rsa_host_key'             [ OK ]


 * Starting daemon update Hosts File...           [ OK ]
starting php based setup routines step banner


*** fvdw-sl NAS firmware
    This is fvdw-sl version: fvdw-sl 11.0
    built on: Januari 3 2012

    LAN IP address: 192.168.1.142 (DHCP)

    Port configuration:

    LAN   -> eth0
php based setup routines finished
start buttons control daemon
buttons-nwsp2 daemon started
web permission on resolv.conf
set device tuning for dms performance
move smbd en nmbd db files to ramdisk to enable disk spin down
rcS finished



Rebuilded whole partition table.
Still get 1 block on partition 4 while using cat /proc/partitions while gparted and fdisk tell me it is perfect.


Ok, got it up and running again.
ssh'd into it, and used mount.
Results in this.
Is it any good?
Code: Select all
login as: root
root@192.168.1.142's password:
root@fvdwsl-base:/ # mount
rootfs on / type rootfs (rw)
/dev/root on / type ext3 (rw,relatime,errors=continue,barrier=0,data=ordered)
none on /proc type proc (rw,relatime)
none on /sys type sysfs (rw,relatime)
/dev/sda5 on /rw_fs type ext3 (rw,noatime,errors=continue,barrier=0,data=ordered)
tmpfs on /rw_fs/tmp/usr/var type tmpfs (rw,relatime,size=200k)
nfsd on /proc/fs/nfsd type nfsd (rw,relatime)


And i rebooted with the "restart server" button under the "reset" tab.
Worked fine, reboot was nice and quick.

I will continue with loop mount tomorrow when i hear that everything is a go.
Goodnight.
minibike12
 
Posts: 99
Joined: Sat Dec 22, 2012 9:23 pm
Location: The Netherlands

Re: nwsp2 classic gpt support

Postby fvdw » Tue Dec 25, 2012 10:45 am

besides the missing sda8. This looks ok to me.

There is also an fdisk present in the firmware.
Run it to see what it tells you about the disk and partition table and copy it

After setting up the loop device do this again to see if there is any change.
I am not an expert wrt losetup and I don't know if setting an offset does something in the partition table (I expect not)


I was thinking of the following if this works then also an approach could be to define a normal partition sda8 with size of 2TB
Then boot the NAS and mount the remaining space using the loop device trick. This will make it easier to keep compatibility with the firmware. But this is for later consideration
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: nwsp2 classic gpt support

Postby minibike12 » Tue Dec 25, 2012 10:51 am

Goodmorning.

I will run fdisk first.
What should i do first?
This
Code: Select all
losetup -o 3686809600 /dev/loop1 /dev/sda
mke2fs -j /dev/loop1
fdisk /dev/sda


Or this
Code: Select all
losetup -o 3686809600 /dev/loop1 /dev/sda
fdisk /dev/sda


Using /dev/loop1 is important right.
minibike12
 
Posts: 99
Joined: Sat Dec 22, 2012 9:23 pm
Location: The Netherlands

Re: nwsp2 classic gpt support

Postby fvdw » Tue Dec 25, 2012 10:58 am

minibike12 wrote:Goodmorning.

I will run fdisk first.
What should i do first?
This
Code: Select all
losetup -o 3686809600 /dev/loop1 /dev/sda
mke2fs -j /dev/loop1
fdisk /dev/sda


Or this
Code: Select all
losetup -o 3686809600 /dev/loop1 /dev/sda
fdisk /dev/sda


Using /dev/loop1 is important right.


I would do a check with fdisk after each step
Using /dev/loop1 is now not so important but in future, if it works, its needed to avoid conflict with another feature in the firmware. (There are 8 loop devices entries)
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: nwsp2 classic gpt support

Postby minibike12 » Tue Dec 25, 2012 11:04 am

This is first fdisk before any changes.
fdisk shows that all partitions are perfect, even partition 4.
Code: Select all
login as: root
root@192.168.1.142's password:
root@fvdwsl-base:/ # fdisk /dev/sda

The number of cylinders for this disk is set to 364801.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

Disk /dev/sda: 3000.5 GB, 3000592982016 bytes
255 heads, 63 sectors/track, 364801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks  Id System
/dev/sda1               9          72      514080  83 Linux
/dev/sda2              73         136      514080  83 Linux
/dev/sda3             137         200      514080  82 Linux swap
/dev/sda4             201         400     1606500   5 Extended
/dev/sda5             209         312      835380  83 Linux
/dev/sda6             321         328       64260  83 Linux
/dev/sda7             337         400      514080  83 Linux

Command (m for help):


This is fdisk after losetup -o 3686809600 /dev/loop1 /dev/sda
/dev/loop1 does not show up, is this correct?
Code: Select all
root@fvdwsl-base:/ # losetup -o 3686809600 /dev/loop1 /dev/sda
root@fvdwsl-base:/ # fdisk /dev/sda

The number of cylinders for this disk is set to 364801.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

Disk /dev/sda: 3000.5 GB, 3000592982016 bytes
255 heads, 63 sectors/track, 364801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks  Id System
/dev/sda1               9          72      514080  83 Linux
/dev/sda2              73         136      514080  83 Linux
/dev/sda3             137         200      514080  82 Linux swap
/dev/sda4             201         400     1606500   5 Extended
/dev/sda5             209         312      835380  83 Linux
/dev/sda6             321         328       64260  83 Linux
/dev/sda7             337         400      514080  83 Linux

Command (m for help):


should i now use?
Code: Select all
mke2fs -j /dev/loop1
minibike12
 
Posts: 99
Joined: Sat Dec 22, 2012 9:23 pm
Location: The Netherlands

PreviousNext

Return to Development

Who is online

Users browsing this forum: No registered users and 6 guests