Krupski
July 13th, 2008, 05:09 PM
SOLVED! See post #3
Hi all,
I'm running Ubuntu server 8.04.1 64 bit in a homebuilt NAS box.
The system has Ubuntu server installed on a small compact flash card, 2GB for the OS and 2GB for swap (on a 4GB CF card). The storage is two 1TB hard drives configured as RAID-1 (mirror).
I've got a small script that I use to make an IMAGE backup of the CF card so that I can revert to a known-good setup if I make some major boo-boo.
Here's the script I use:
echo Saving OS image, please wait...
/bin/dd if=/dev/sdc of=/home/shared/ftp/linux/ubuntu/ubuntu-server-cf-bootdisk-snapshot-$(date +%d-%b-%Y-%H.%M).img bs=1M count=4096
echo Done!
It works fine... I can use Winimage (in Windoze) to copy the image back to the CF card if I need to.
Now here's the problem: The device names don't always stay the same. Sometimes the CF card is /dev/sda and sometimes it's /dev/sdc
Of course, the solution would seem to be simply use UUID instead... but the CF card itself doesn't HAVE a UUID!
The root and swap partitions do, but not the main device itself!
Here's a dump of "blkid | sort":
/dev/md0: LABEL="linux-storage" UUID="35ea8bc6-1cc3-4abb-8d86-23497ffe3b5e" SEC_TYPE="ext2" TYPE="ext3"
/dev/sda: UUID="0ea78486-aaa3-87b3-1499-94a4a304f114" TYPE="mdraid"
/dev/sdb: UUID="0ea78486-aaa3-87b3-1499-94a4a304f114" TYPE="mdraid"
/dev/sdc1: LABEL="linux-root" UUID="9a364efd-0521-40ff-a76b-1005cdd8e41a" TYPE="ext3"
/dev/sdc2: TYPE="swap" UUID="070d44c8-e6a2-4e4f-933d-0f571830551a"
Note that (this time) the RAID drives are /dev/sda and /dev/sdb, and Linux is on /dev/sdc1 and 2. But, there's no UUID for /dev/sdc as a whole!
Is there any way to find or make or set a UUID or some other way to POSITIVELY identify the CF card so that my OS backup script ALWAYS works when Ubuntu plays name switch-er-oo?
Thanks in advance!
-- Roger
Hi all,
I'm running Ubuntu server 8.04.1 64 bit in a homebuilt NAS box.
The system has Ubuntu server installed on a small compact flash card, 2GB for the OS and 2GB for swap (on a 4GB CF card). The storage is two 1TB hard drives configured as RAID-1 (mirror).
I've got a small script that I use to make an IMAGE backup of the CF card so that I can revert to a known-good setup if I make some major boo-boo.
Here's the script I use:
echo Saving OS image, please wait...
/bin/dd if=/dev/sdc of=/home/shared/ftp/linux/ubuntu/ubuntu-server-cf-bootdisk-snapshot-$(date +%d-%b-%Y-%H.%M).img bs=1M count=4096
echo Done!
It works fine... I can use Winimage (in Windoze) to copy the image back to the CF card if I need to.
Now here's the problem: The device names don't always stay the same. Sometimes the CF card is /dev/sda and sometimes it's /dev/sdc
Of course, the solution would seem to be simply use UUID instead... but the CF card itself doesn't HAVE a UUID!
The root and swap partitions do, but not the main device itself!
Here's a dump of "blkid | sort":
/dev/md0: LABEL="linux-storage" UUID="35ea8bc6-1cc3-4abb-8d86-23497ffe3b5e" SEC_TYPE="ext2" TYPE="ext3"
/dev/sda: UUID="0ea78486-aaa3-87b3-1499-94a4a304f114" TYPE="mdraid"
/dev/sdb: UUID="0ea78486-aaa3-87b3-1499-94a4a304f114" TYPE="mdraid"
/dev/sdc1: LABEL="linux-root" UUID="9a364efd-0521-40ff-a76b-1005cdd8e41a" TYPE="ext3"
/dev/sdc2: TYPE="swap" UUID="070d44c8-e6a2-4e4f-933d-0f571830551a"
Note that (this time) the RAID drives are /dev/sda and /dev/sdb, and Linux is on /dev/sdc1 and 2. But, there's no UUID for /dev/sdc as a whole!
Is there any way to find or make or set a UUID or some other way to POSITIVELY identify the CF card so that my OS backup script ALWAYS works when Ubuntu plays name switch-er-oo?
Thanks in advance!
-- Roger