@szonic: Zunächst brauchst du unter Windows eine Netzwerkfreigabe mit Schreibrechten für JEDEN...
Dann muss man sich unter Linux das Paket smbfs installieren und dort die Netzwerk-Gruppe angeben wie sie auch vom entsprechenden Windows-PC ist (bei mir wars zb WORKGROUP)
Dann mounted man die Windowsfreigabe auf das Linux und lässt ein komplettes Abbild der Festplatte dahin schreiben - weil er ein Image anlegt was so gross wie die Festplatte ist, nicht nur wieviel Platz verbraucht ist...
Wenn da nach nem Password gefragt wird, man aber keins eingestellt hat -> einfach Enter drücken...
(siehe Bilder im Spoiler)
Also zb:
apt-get update
apt-get install smbfs
smbmount //<windows-ip>/<freigabe> /mnt
dd if=/dev/sda of=/mnt/cf_backup.iso
Umgekehrt das dann wieder aufspielen:
dd if=/mnt/cf_backup.iso of=/dev/sda
(if= input file .... of= output file)
Üblicherweise erstellt man übrigends von der ganzen Festplatte ein Abbild, nicht nur von einer Partition - Weil die ersten 512 Byte enthalten den Bootsektor (Master Boot Record) und die Partitionstabelle...
fdisk -uc /dev/sda
Disk /dev/sda: 4520 MB, 4520411136 bytes
255 heads, 63 sectors/track, 549 cylinders, total 8828928 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000bfb2e
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 8361983 4179968 83 Linux
/dev/sda2 8364030 8826879 231425 5 Extended
/dev/sda5 8364032 8826879 231424 82 Linux swap / Solaris
Disk /dev/sda: 4520 MB, 4520411136 bytes
255 heads, 63 sectors/track, 549 cylinders, total 8828928 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000bfb2e
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 8828927 4413440 83 Linux
resize2fs /dev/sda1
dd if=/dev/zero of=/var/swapfile bs=1M count=128
mkswap /var/swapfile
swapon /var/swapfile
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# / was on /dev/sda1 during installation
UUID=6d030729-aee7-4d3d-87d5-1a3e983d03b9 / ext3 errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
[COLOR=#ff0000]UUID=d54f7dc6-1d04-4e49-9174-f90b8463f730 none swap sw 0 0[/COLOR]
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto 0 0
tmpfs /tmp tmpfs size=50M 0 0
tmpfs /var/tmp tmpfs size=20M 0 0
tmpfs /var/log tmpfs size=70M 0 0
tmpfs /var/emu/tmp tmpfs size=10M 0 0
tmpfs /var/cache/apt/archives tmpfs size=150M 0 0
/var/swapfile none swap sw 0 0
bei einer 1:1 kopie des datenträgers bleibt alles original und unverändert, ob mit dd oder was anderem is egal - also auch tmp2ram bleibt installiertfunktioniert das in der art weiter, wie die das swapfile eingebunden hast in der fstab ?
Platte /mnt/extern/sda.img: 0 MByte, 0 Byte
255 Köpfe, 63 Sektoren/Spuren, 0 Zylinder, zusammen 0 Sektoren
Einheiten = Sektoren von 1 × [COLOR=#ff0000]512[/COLOR] = 512 Bytes
Disk identifier: 0xd53d826f
Gerät boot. Anfang Ende Blöcke Id System
/mnt/extern/sda.img1 * 63 104872319 52436128+ 7 HPFS/NTFS
Partition 1 hat unterschiedliche phys./log. Enden:
phys=(1023, 254, 63) logisch=(6527, 254, 63)
/mnt/extern/sda.img2 104872320 109065284 2096482+ 82 Linux Swap / Solaris
Partition 2 hat unterschiedliche phys./log. Anfänge (nicht-Linux?):
phys=(1023, 0, 1) logisch=(6528, 0, 1)
Partition 2 hat unterschiedliche phys./log. Enden:
phys=(1023, 254, 63) logisch=(6788, 254, 63)
[COLOR=#ff0000]/mnt/extern/sda.img3 109065285 156296384 23615550 83 Linux[/COLOR]
Partition 3 hat unterschiedliche phys./log. Anfänge (nicht-Linux?):
phys=(1023, 0, 1) logisch=(6789, 0, 1)
Partition 3 hat unterschiedliche phys./log. Enden:
phys=(1023, 254, 63) logisch=(9728, 254, 63)
Ist in meinen Squeeze Quellen gar nicht drin !?!also vorher noch: apt-get install losetup
hab das verwechselt - war parallel am cryptsetup beitrag am schreiben - wird in diesem zusammenhang nicht benötigtIst in meinen Squeeze Quellen gar nicht drin !?!
wozu?Habe eben mal im Script ipcbackup.sh geschaut, aber irgendwie $backupdir nicht definieren können :-(
sda1? nein, das würde nicht funktionieren.. es muss ein abbild der gesammten platte sein da in den ersten 512 bytes (am anfang) der MBR und die PartitionsTabelle hinterlegt sind, kopiert man die nicht kann davon auch nicht gebootet werden..Verständnisfrage > Wenn nun eine neue CF verbaut werden würde und man das sda1.img dorthin zurück kopiert > Würde dann die Karte beim nächsten Boot vom Igel nicht direkt erkannt und gemountet und System fährt hoch?
#BACKUPDIR="/var/backups/ipc"
BACKUPDIR="/media/NAS/ipcbackups"
Wir verwenden Cookies und ähnliche Technologien für folgende Zwecke:
Akzeptieren Sie Cookies und diese Technologien?
Wir verwenden Cookies und ähnliche Technologien für folgende Zwecke:
Akzeptieren Sie Cookies und diese Technologien?