[linuxola] Wie loescht man eine hard disk automatisch ?

Philipp Hanselmann philipp at schoolnet.na
Son Nov 4 21:45:33 CET 2007


Hi,

Ich habe ein kleines Linux problem ...

Bei der Konfiguration des Backups von Edubuntu, moechte ich die 2 hard
disk voll automatisch formatieren/partitionieren (eine primare ext3
Partition)

<snip>
        ## format this disk
        if [ "$EXIT" = "OK" ] ; then
            echo "${red} * format disk /dev/${SUGGESTED_DISK} ${reset}"

            # create the partition table
            sfdisk /dev/${SUGGESTED_DISK} << EOF
;
;
;
;
EOF
            [ $? -ne 0 ] && echo "${red}   > ERROR: formating disk
/dev/${SUGGESTED_DISK} ${reset}"

            # create empty ext3 filesystem
            mkfs.ext3 /dev/${SUGGESTED_DISK}1
            [ $? -ne 0 ] && echo "${red}   > ERROR: formating disk
/dev/${SUGGESTED_DISK} ${reset}"
</snip>

sfdisk loescht die disk. Doch mkfs.ext3 bring eine Fehlermeldung, dass
die Partition bereits gemounted ist?

Trotzdem zeigt gparted die neue hard disk formatiert als ext3. Doch wenn
ich die neue disk mounten moechte funktionierts trotzdem nicht?
Wenn ich manuell mit gparted die disk formatiere funktioniert alles
tadellos. Hat jemand eine Idea was ich falsch mache?

Habe noch ein Woche zeit um dieses "kleine" Problem  zu loesen,
ansonsten started das Backup setup gparted. Schoen ware es jedoch wenn
auch diese Variante funktionieren wurde.

Gruss,

Philipp





-- 
SchoolNet NA - Youth Empowerment through Information and Communication 
Technology

SchoolNet Namibia provides sustainable, low cost technology solutions 
and internet access, as well as technical support, training services and 
rich educational content to schools, community-based educational 
organisations, and educational practitioners throughout Namibia.

www.schoolnet.na

toll free number: 0800 005793

Philipp Hanselmann
philipp at schoolnet.na