<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://rsewiki.electro.dtu.dk/index.php?action=history&amp;feed=atom&amp;title=SMR_Flash_Disk_Cloning</id>
	<title>SMR Flash Disk Cloning - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://rsewiki.electro.dtu.dk/index.php?action=history&amp;feed=atom&amp;title=SMR_Flash_Disk_Cloning"/>
	<link rel="alternate" type="text/html" href="https://rsewiki.electro.dtu.dk/index.php?title=SMR_Flash_Disk_Cloning&amp;action=history"/>
	<updated>2026-05-03T12:44:06Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.1</generator>
	<entry>
		<id>https://rsewiki.electro.dtu.dk/index.php?title=SMR_Flash_Disk_Cloning&amp;diff=170&amp;oldid=prev</id>
		<title>Lvm: New page: Some of the SMR&#039;s now have solid-state flash memory disks, instead of the laptop, 2.5&quot; disks used on older models.  This wiki page contains some notes describing how to write a bootable fl...</title>
		<link rel="alternate" type="text/html" href="https://rsewiki.electro.dtu.dk/index.php?title=SMR_Flash_Disk_Cloning&amp;diff=170&amp;oldid=prev"/>
		<updated>2008-09-29T10:15:12Z</updated>

		<summary type="html">&lt;p&gt;New page: Some of the SMR&amp;#039;s now have solid-state flash memory disks, instead of the laptop, 2.5&amp;quot; disks used on older models.  This wiki page contains some notes describing how to write a bootable fl...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Some of the SMR&amp;#039;s now have solid-state flash memory disks, instead of the laptop, 2.5&amp;quot; disks used on&lt;br /&gt;
older models.&lt;br /&gt;
&lt;br /&gt;
This wiki page contains some notes describing how to write a bootable flash disk image&lt;br /&gt;
(Slackware Linux) to a memory card. It assumes a Linux PC with USB flash card reader/writer,&lt;br /&gt;
available as &amp;#039;&amp;#039;/dev/sda&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
The commands below is implemented in this script [Clone script].&lt;br /&gt;
Usage:&lt;br /&gt;
 clone &amp;lt;from_file.tar.gz&amp;gt; &amp;lt;to device&amp;gt;&lt;br /&gt;
&amp;lt;to device&amp;gt; can be both the USB bus (/dev/sdx) or a IDE device (/dev/hdx)&lt;br /&gt;
&lt;br /&gt;
The script will place a file .cloned-at on the Flash Disk with time information for the cloning.&lt;br /&gt;
&lt;br /&gt;
If you put the Flash Disk on the IDE bus and the computer will not boot (LILO - Timestamp mismatch) then the MBR on the Flash Disk must be erased as follows:&lt;br /&gt;
 dd if=/dev/zero of=/dev/hdx bs=1 count=512&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Writing an image&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Format the disk, with one large Linux partition:&lt;br /&gt;
 sfdisk -L /dev/sda &amp;lt;&amp;lt;EOF&lt;br /&gt;
 ,,L,*&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
Create a filesystem:&lt;br /&gt;
 mke2fs /dev/sda1 -L /&lt;br /&gt;
&lt;br /&gt;
Mount the new, empty partition:&lt;br /&gt;
 mkdir -p /tmp/u&lt;br /&gt;
 mount /dev/sda1 /tmp/u&lt;br /&gt;
&lt;br /&gt;
Write a previously created image from &amp;#039;&amp;#039;flash.tar.gz&amp;#039;&amp;#039;&lt;br /&gt;
 zcat flash.tar.gz |&lt;br /&gt;
 tar --extract --file - --directory /tmp/u --preserve-permissions&lt;br /&gt;
&lt;br /&gt;
Create a patched &amp;#039;&amp;#039;lilo.conf&amp;#039;&amp;#039;, so that we can run LILO with the flash card mounted via USB.&lt;br /&gt;
(This won&amp;#039;t be necessary if the image written above already contains such a file.)&lt;br /&gt;
 patch -o /tmp/u/etc/lilo_usb.conf /tmp/u/etc/lilo.conf &amp;lt;&amp;lt;EOF&lt;br /&gt;
 *** /tmp/u/etc/lilo.conf        Tue Nov  4 21:34:44 2003&lt;br /&gt;
 --- lilo_usb.conf       Thu Dec 11 11:50:55 2003&lt;br /&gt;
 ***************&lt;br /&gt;
 *** 4,6 ****&lt;br /&gt;
   # Start LILO global section&lt;br /&gt;
 ! boot = /dev/hda&lt;br /&gt;
   message = /boot/boot_message.txt&lt;br /&gt;
 --- 4,7 ----&lt;br /&gt;
   # Start LILO global section&lt;br /&gt;
 ! boot = /dev/sda&lt;br /&gt;
 ! disk = /dev/sda bios=0x80&lt;br /&gt;
   message = /boot/boot_message.txt&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
Run LILO:&lt;br /&gt;
 chroot /tmp/u lilo -v -C /etc/lilo_usb.conf&lt;br /&gt;
&lt;br /&gt;
All done:&lt;br /&gt;
 umount /dev/sda1&lt;br /&gt;
 eject /dev/sda&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Reading an image&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Mount as above:&lt;br /&gt;
 mkdir -p /tmp/u&lt;br /&gt;
 mount /dev/sda1 /tmp/u&lt;br /&gt;
&lt;br /&gt;
Read the partition:&lt;br /&gt;
 tar --create --file - --directory /tmp/u --one-file-system --exclude lost+found . |&lt;br /&gt;
 gzip &amp;gt; flash.tar.gz&lt;br /&gt;
or&lt;br /&gt;
 tar -zcf - -C /tmp/u --one-file-system --exclude lost+found . &amp;gt; flash.tar.gz&lt;br /&gt;
&lt;br /&gt;
All done:&lt;br /&gt;
 umount /dev/sda1&lt;br /&gt;
 eject /dev/sda&lt;/div&gt;</summary>
		<author><name>Lvm</name></author>
	</entry>
</feed>