Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] Noob - want to add fuse-ext2 to SystemRescueCD
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Longtimer
n00b
n00b


Joined: 30 Mar 2018
Posts: 5

PostPosted: Fri Mar 30, 2018 7:09 am    Post subject: [Solved] Noob - want to add fuse-ext2 to SystemRescueCD Reply with quote

***Just a note that I found a work around and did not end up adding the the software to the CD***

I am trying to use the Gentoo based SystemRescueCD for data recovery from my 3 disk NAS RAID (Readynas NV). To do this I need fuse-ext2 however it is not part of the live CD. There are instructions for adding packages here: http://www.system-rescue-cd.org/Customization/

But I can`t seem to get these instructions to work. I get an error at "chroot /mnt/custom/customcd/files /bin/bash" Is there a simpler way to get fuse-ext2 running? even if the package is not permanently made part of the CD image? BTW I am actually running it from a USB key.

A couple people on these forums have been able to do it on Gentoo but when a person says they "fetched" XYZ, or got it the old fashioned way I'm just do not know how to go about this.
Links to other success here:
https://forums.gentoo.org/viewtopic-t-1049380-highlight-fuseext2.html
https://forums.gentoo.org/viewtopic-t-1012560-highlight-fuseext2.html

Any help appreciated.
S.


Last edited by Longtimer on Sun Apr 01, 2018 11:58 pm; edited 1 time in total
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10589
Location: Somewhere over Atlanta, Georgia

PostPosted: Fri Mar 30, 2018 6:19 pm    Post subject: Re: Noob - want to add fuse-ext2 to SystemRescueCD Reply with quote

Longtimer wrote:
I get an error at "chroot /mnt/custom/customcd/files /bin/bash"
What's the error? Also, what does
Code:
ls -l /mnt/custom/customcd/files
produce?

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Fri Mar 30, 2018 7:17 pm    Post subject: Reply with quote

Hmh. Why you need fuse-ext2? I'd be very surprised if Systemrescuecd could not handle ext2/ext3. Or I misunderstood something?
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54232
Location: 56N 3W

PostPosted: Fri Mar 30, 2018 7:26 pm    Post subject: Reply with quote

Longtimer,

Welcome to Gentoo.

Quote:
I am trying to use the Gentoo based SystemRescueCD for data recovery from my 3 disk NAS RAID ...
sounds like the beginning of a long sad story.
Tell the story so far and we may yet be able to help you get to a happy ending. fuse-ext2 may not be one of the steps along the way.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Longtimer
n00b
n00b


Joined: 30 Mar 2018
Posts: 5

PostPosted: Fri Mar 30, 2018 8:37 pm    Post subject: Reply with quote

My story:
I have an original Infrant ReadyNAS NV with 3 x 2.0 TB drives that went unresponsive. Drive 1 has a number of bad sectors but is decent, Drive 2 is good and Drive 3 is really bad. I have a backup from 2 years ago so my goal is to copy off anything modified or added after Jan 2016.

I started with SystemRescueCD, a Gentoo live CD, to clone the disks and I was hoping to carry on with the data recovery using this live CD.

Cloning went well and my next step is to access the VG then copy the files. This is a recipe that is supposed to make the drives accessible:
(1) sudo su
(2) apt-get install fuseext2
(3) apt-get install lvm2
(4) modprobe fuse
(5) vgscan
(6) vgchange -ay c
(7) fuseext2 -o ro -o sync_read /dev/c/c /mnt
That’s it!!!
You can now see the mounted files in the /mnt directory


lvm2 is already there so does not need to be installed but fuse-ext2 is not and apt-get is not part of the live CD. I tried to follow the instructions in the link above to install fuse-ext2 but do to errors and inexperience, cannot follow them through. I will try again and provide the error.

This morning I used a Linux Mint DVD and was able to access to the files using the the above recipe but ran into difficulty with the system being a little unstable. Also, I don't know how to get the LV so show up in the GUI file manager where I am a little more experienced. I'm thinking the more stripped down SystemRescueCD would be more stable and it would be nice to have a single disk if I or a friend needed to do this again.

Aside: can anyone provide a simple command line to copy all files and directory structure that are created or modified after a certain date. In DOS I would have used xcopy with a date filter but in linux it is not as straight forward. It appears I need to somehow combine cp or rsync with find but these concepts are a little new to me.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54232
Location: 56N 3W

PostPosted: Fri Mar 30, 2018 9:12 pm    Post subject: Reply with quote

Longtimer,

to clone a drive with suspect bad sectors you need ddrescue.
That's not on the Gentoo live CD but it may be on System RescueCD.
You don't say what tool you used for the cloning.

As you don't mention mdadm, for software raid, it appears that either LVM provides the raid (it can) or you have used the hardware raid in the Infrant ReadyNAS.

Gentoo does not support apt-get, thats a package manager used by some binary distros.

All linux distros support ext2 anh ext3 natively so Fuse-ext2 is not required to read ext2 or ex3 on Linux.
System Rescue CD already has LVM.

So, boot System Rescue CD and you will be at a root shell prompt.

Your steps
(1) sudo su
(2) apt-get install fuseext2
(3) apt-get install lvm2
(4) modprobe fuse
are not required.
Code:
(5) vgscan
(6) vgchange -ay c
should just work if c is the name of a volume group. That looks odd.

Code:
pvdisplay
vgdisplay
lvdisplay
may shed some light on things.

Now look in /dev/mapper for your logical volumes.
On my live system I get.
Code:
$ ls /dev/mapper/
control               host-packages    ssd-olde--usr   vg-home
guests-bluetest       host-portage     ssd-olde--var   vg-local
guests-dmz--test      host-root        static-local    vg-opt
guests-mail           host-swap        static-opt      vg-packages
guests-master         host-tmp         static-portage  vg-portage
guests-media--server  host-usr         static-root     vg-tmp
guests-router         host-var         static-usr      vg-usr
guests-web--server    ssd-olde--local  static-var      vg-var
host-distfiles        ssd-olde--root   vg-distfiles


With System Rescue CD, you can do
Code:
mount -o,ro /dev/mapper/<lv_name> /mnt/gentoo

You can now see the mounted filesystem in /mnt/gentoo

sync_read will slow things down, so don't use it unless you really need to. Then the mount command is
Code:
mount -o,ro,sync /dev/mapper/<lv_name> /mnt/gentoo

_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Longtimer
n00b
n00b


Joined: 30 Mar 2018
Posts: 5

PostPosted: Sat Mar 31, 2018 3:03 pm    Post subject: Reply with quote

Thank you ND for your response. The commands seem to have worked up to the mounting of the drive where I get 'NTFS signature is missing'.. Any furhter advice?
Code:
root@sysresccd /root % lsblk -o name,label,size,fstype,model
NAME    LABEL             SIZE FSTYPE      MODEL
loop0                   468.5M squashfs   
sda                     465.8G             ST500DM002-1BD14
├─sda1  System Reserved   100M ntfs       
└─sda2                  465.7G ntfs       
sdb                       3.8G             USB DISK 2.0   
└─sdb1  SYS_RESCU         3.7G vfat       
sdc                       3.8G vfat        UDisk           
sdd                       1.8T             WDC WD20EFRX-68E
├─sdd1                      2G ext3       
├─sdd2                    250M swap       
├─sdd3                      1K             
└─sdd5                    1.8T LVM2_member
sde                       1.8T             WDC WD20EFRX-68E
├─sde1                      2G ext3       
├─sde2                    250M swap       
├─sde3                      1K             
└─sde5                    1.8T LVM2_member
  └─c-c                   3.6T             
sdg                       1.8T             WDC WD20EARS-00M

root@sysresccd /root % vgscan
  Reading all physical volumes.  This may take a while...
  Found volume group "c" using metadata type lvm2

root@sysresccd /root % vgchange -ay c
  1 logical volume(s) in volume group "c" now active

root@sysresccd /root % cd /dev/mapper

root@sysresccd /dev/mapper % ls
c-c  control

root@sysresccd /dev/mapper % mount -o,ro /dev/mapper/c-c /mnt/gentoo
NTFS signature is missing.
Failed to mount '/dev/mapper/c-c': Invalid argument
The device '/dev/mapper/c-c' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?
root@sysresccd /dev/mapper %


I also tried
Code:
root@sysresccd /dev/mapper % mount -o,ro /dev/mapper/c/c /mnt/gentoo

Here is the lvdisplay
Code:
root@sysresccd /dev/c % lvdisplay
  --- Logical volume ---
  LV Path                /dev/c/c
  LV Name                c
  VG Name                c
  LV UUID                Pj37iF-1F06-8Dzv-Nal7-6sfz-xxZn-5O9vZS
  LV Write Access        read/write
  LV Creation host, time ,
  LV Status              available
  # open                 0
  LV Size                3.63 TiB
  Current LE             119090
  Segments               2
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0
Back to top
View user's profile Send private message
Longtimer
n00b
n00b


Joined: 30 Mar 2018
Posts: 5

PostPosted: Sat Mar 31, 2018 4:42 pm    Post subject: Reply with quote

Rebooted and tried again but got a different error:
Code:
root@sysresccd /root % pvscan
  PV /dev/sdc5   VG c               lvm2 [1.82 TiB / 0    free]
  PV /dev/sdb5   VG c               lvm2 [1.82 TiB / 0    free]
  Total: 2 [3.63 TiB] / in use: 2 [3.63 TiB] / in no VG: 0 [0   ]
root@sysresccd /root % vgchange -ay c
  1 logical volume(s) in volume group "c" now active

Code:
root@sysresccd /root % mount -o ro /dev/mapper/c-c /mnt/raid
mount: /mnt/raid: wrong fs type, bad option, bad superblock on /dev/mapper/c-c, missing codepage or helper program, or other error.

Code:
root@sysresccd /root % pvdisplay
  --- Physical volume ---
  PV Name               /dev/sdc5
  VG Name               c
  PV Size               1.82 TiB / not usable 21.08 MiB
  Allocatable           yes (but full)
  PE Size               32.00 MiB
  Total PE              59545
  Free PE               0
  Allocated PE          59545
  PV UUID               RPTNFG-vsl4-m3vd-1l5k-v1Vx-WzIp-63JzYz
   
  --- Physical volume ---
  PV Name               /dev/sdb5
  VG Name               c
  PV Size               1.82 TiB / not usable 21.08 MiB
  Allocatable           yes (but full)
  PE Size               32.00 MiB
  Total PE              59545
  Free PE               0
  Allocated PE          59545
  PV UUID               qXV7gH-XApF-XupM-CvrR-8rD2-M0D0-MRg9nj
   
root@sysresccd /root % vgdisplay
  --- Volume group ---
  VG Name               c
  System ID             
  Format                lvm2
  Metadata Areas        2
  Metadata Sequence No  4
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                1
  Open LV               0
  Max PV                0
  Cur PV                2
  Act PV                2
  VG Size               3.63 TiB
  PE Size               32.00 MiB
  Total PE              119090
  Alloc PE / Size       119090 / 3.63 TiB
  Free  PE / Size       0 / 0   
  VG UUID               484Bss-pejp-kKVE-dgtW-VYJh-UrS1-CLh6oz
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54232
Location: 56N 3W

PostPosted: Sat Mar 31, 2018 7:06 pm    Post subject: Reply with quote

Longtimer,

Code:
sdd         
└─sdd5                    1.8T LVM2_member
sde                       1.8T             WDC WD20EFRX-68E         
└─sde5                    1.8T LVM2_member
  └─c-c                   3.6T             
sdg                       1.8T             WDC WD20EARS-00M


lvm2 did its thing and it shows that you have a 3.6T volume made out of sdd5 and sde5 while sdg appears to not be used.
Is that what you were expecting?

When you did
Code:
root@sysresccd /dev/mapper % mount -o,ro /dev/mapper/c-c /mnt/gentoo
NTFS signature is missing.
the kernel ran through all the filesystems it knows, with NTFS being the last one and printed NTFS signature is missing because nothing worked.

Either System Rescue CD is missing the filesystem you need or the filesystem you have is damaged, or both.
Code:
less /proc/filesystems
will show the filesystems the kernel knows about.
Filesystems provided by loadable modules that are not loaded will not be shown.

You mentioned fuseext2, so we can remove some of the guesswork by telling mount to only try one filesystem.
Code:
mount -o,ro -t ext2 /dev/mapper/c/c /mnt/gentoo

Try -t ext2 ext3 and ext4. The kernel has already done this so it won't work but the error messages on the screen and at the end of dmesg may be useful.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Longtimer
n00b
n00b


Joined: 30 Mar 2018
Posts: 5

PostPosted: Sun Apr 01, 2018 11:56 pm    Post subject: Reply with quote

Well I've been rooting around the rabbit hole for a while now and I'm finally up for air. I mutinied and set up a live persistent USB with Mint 18 and was able to access the files. As we speak they are being transfered to another drive. The USB was very easy to setup using Windows software here: https://www.pendrivelinux.com/universal-usb-installer-easy-as-1-2-3/

The key was to use "fuseext2". Not "fuse-ext2" and not "mount". It turns out that the SPARC versions of the ReadyNAS NV with version 4.x firmware use a non-standard 16k block size so fuseext2 is the only one that will play nice-ish. I still could not access the mounting with any GUI applications on Mint and it would lock up the LV if I tried. With my level of knowledge the only way out at that point was a reboot. Note that my original post I was looking for fuse-ext2 which was wrong. I am thankful you that we did not spend time with my request as it would have made the rabbit hole harder to get out of.

While the clues were there, it took a long time for me to put them together. On an unsuccessful mount, Mint gives some advice to check the dmesg using
Code:
dmesg | tail
where I found this:
Code:
EXT3-fs (dm-3): error: bad blocksize 16384

Googling the message found someone with the same issue and that fuseext2 must be used to accommodate the nonstandard block size. With that change, it was off to the races and plodding through authoring the proper rsync and find commands to get what I wanted.

I still like the tool set on the SytemRescueCD but I don't think I am at the level to add the software required to the live CD. It is a shame that it is not easier as there are always new (or old) tools that come along a person might need or want.

Thank you very much for the time you spent considering my challenge. Just knowing there are knowledgeable people like you willing to help lowered the anxiety greatly.

Longtimer.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54232
Location: 56N 3W

PostPosted: Mon Apr 02, 2018 9:08 am    Post subject: Reply with quote

Longtimer,

That's the problem with standards, there are so many to choose from.

extX supports 1k, 2k and 4k block sizes as standard.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum