I have an external HDD I took from a laptop, It has 2 partitions: 100MB they used for backuping (windows) and the rest 99.9GB in a separated partition.
The HD got corrupted due to poor powering in the raspy. I fixed that with an external Y usb cable to a cellphone charger (cutted the red cable to avoid back-powering he raspi)
The thing is that now the big partition is dissapeared and if I try to do stuf like
fdisk -l the thing freezes when checking the HDD.
This is the output of
Filesystem 1K-blocks Used Available Use% Mounted on rootfs 7352320 1655860 5368012 24% / /dev/mmcblk0p2 7352320 1655860 5368012 24% / devtmpfs 191888 4 191884 1% /dev none 38392 400 37992 2% /run /dev/mmcblk0p1 34730 20040 14690 58% /boot /dev/mmcblk0p2 7352320 1655860 5368012 24% /home /dev/mmcblk0p2 7352320 1655860 5368012 24% /lib/modules /dev/sda1 102396 24712 77684 25% /media/Reservado para el sistema /dev/mmcblk0p2 7352320 1655860 5368012 24% /xbmc-backup
The raspi has an 8GB sd card on it. So I guess rootfs, mmcblk0p2 they all refere to stuff in my SD card and the sda1 is the 100Mb partition for back ups. There WAS an sda2 with the rest of the 99.9GB in there. And I was even able to enter it (it was auto-mounted in /media/usb2)
What I want to do is to fully destroy all the partitions on sda and fix all the sectors and re format that. I want to create one partition with 4GB or so for the OS, and move the OS from the SD to the HDD And the rest in NTFS for file sharing with my windows machines (physically or trough the LAN).
- How can I reshape and reformat sda? (fdisk freezes in the middle of the process)
- What filesystem do I need to set in the small partition to hold the OS?
- What filesystem is the best to share files between the raspi and my win machines?
PS: I use xbian, I have XBMC running in there so xbian is a must :D
PSS: the system is headless so no gparted or other GUI things