hansiheiser Posted July 8, 2016 #1 Posted July 8, 2016 Hello there! I did something increadibly stupid and basically destroyed my running system by renaming libc.so to something else... now the system is not booting anymore... So, I used a ubuntu live dvd and mounted my disks (RAID5) using mdadm. But this mounted only volume1, that is my files. I cannot find the system files. I guess, if I could access the system partition and rename libc the system will work again. Here's what lsblk gives me: NAME FSTYPE SIZE MOUNTPOINT LABEL sda 3,7T ├─sda1 linux_raid_member 2,4G ├─sda2 linux_raid_member 2G [sWAP] └─sda3 linux_raid_member 3,6T DiskStation:2 sdb 3,7T ├─sdb1 linux_raid_member 2,4G ├─sdb2 linux_raid_member 2G [sWAP] └─sdb3 linux_raid_member 3,6T DiskStation:2 sdc 3,7T ├─sdc1 linux_raid_member 2,4G ├─sdc2 linux_raid_member 2G [sWAP] └─sdc3 linux_raid_member 3,6T DiskStation:2 sdd 3,7T ├─sdd1 linux_raid_member 2,4G ├─sdd2 linux_raid_member 2G [sWAP] └─sdd3 linux_raid_member 3,6T DiskStation:2 sde 3,7T ├─sde1 linux_raid_member 2,4G ├─sde2 linux_raid_member 2G [sWAP] └─sde3 linux_raid_member 3,6T DiskStation:2 sdf 3,7T ├─sdf1 linux_raid_member 2,4G ├─sdf2 linux_raid_member 2G [sWAP] └─sdf3 linux_raid_member 3,6T DiskStation:2 sdg 7,5G └─sdg1 vfat 16M /media/ubuntu/AFC2-F7F5 sr0 iso9660 1,4G /cdrom Ubuntu 16.04 LTS amd64 loop0 squashfs 1,3G /rofs I can assemble sda3-sdf3 into an array and mount it. But I cannot do the same with sda1-sdf1, which I suppose is the system-partition. Does anyone have an idea how I could access the system files? I dont want to setup the whole system again as this would mean backupping several TB of data...
Diverge Posted July 8, 2016 #2 Posted July 8, 2016 Only the data volume is an actual array (raid 5), the others are just mirrors of one another. You could just try mounting one of the system partitions by itself to see if you can see any files.
hansiheiser Posted July 11, 2016 Author #3 Posted July 11, 2016 That's interesting... however, I cannot simply mount e.g. sda1 mount: unknown filesystem type 'linux_raid_member' Just using mdadm on sda1 fails because it has no superblock. Any suggestions how I could mount sda1?
sbv3000 Posted July 11, 2016 #4 Posted July 11, 2016 this is probably a dumb suggestion, but if you had a spare hdd and created a new dsm install with no volume, you might be able to clone the system partition across to the other drives with disk partition software. or if this 'new' drive is on sata channel 1 on the mobo/controller, you might find the system boots ok but the system partition on disks 2-n need repairing.
hansiheiser Posted July 14, 2016 Author #5 Posted July 14, 2016 I finally solved the problem by going back to Diverge's suggestion. You can mount sda1 etc. by using -t ext4 for the mount command. With this accessing the relevant files was no problem. Now, my server is running again without any problems Thanks for you help!
davioxx Posted July 30, 2016 #6 Posted July 30, 2016 @Hansiheiser, did you had to unmount the raid 5 before mounting the system? I did the same dumb thing and modified the busybox binary and everything went crazy
Recommended Posts