That's incorrect, cylinders and sectors haven't mattered since 1996. The computer just asks for block 6, block 123485701, or whatever, and the hard drive handles all the rest.
What do you mean by "first 2048 sectors"? Do you mean blocks?
I see a couple of pitfalls here. First of all, did you reload the partition table after running dd? Linux needs to be told "the partition table has changed" when you do that, or it will just keep using the old layout until the next reboot. There's also a "backup" GPT sector which might have to be regenerated after you do the copy.
I'm out on the road right now I'll get back to my house and then I'll be able to respond thank you
---------- Post updated at 03:25 PM ---------- Previous update was at 02:25 PM ----------
This is the piece preceding the partitioning in the recovery script...
All drive designations are for the 2nd external USB Drive -- which gets attached as /dev/sdc.
The USB drive used for the backup process is /dev/sdb. /dev/sdb1 is a LiveCD partition and /dev/sdb2 is the data partition.
This is the section following the partitioning piece...
This is what i DID have until I realized that I kept getting a corrupted partition table.
(As you can see, in the beginning, to work around the corrupt partition issue,
I was trying to simply delete /dev/sdc3, put in a new partition, format it, run partprobe to update the kernel
and then do the cryptsetup luksRestore.
But I kept getting a "partition corrupt' error and exit.)
Which is what brings me to my original question....
How can I parse and initialize an array and a for loop that will just recreate these partitions from scratch rather than doing it otherwise.
Since all information gathered about /dev/sda showed that the EFI partition started at sector 2048,
I just used dd to copy sectors 0-2047 and then restored the other two partitions using the same method.
All of the information that I thought I might need to do the recovery part was saved during the execution of the backup script:
But WAIT!! Something just hit me!!
actually gives me 2048 BLOCKS and not 2047 sectors, right?!?! Am I on the right track here???
---------- Post updated at 03:58 PM ---------- Previous update was at 03:25 PM ----------
So if I understand it correctly, in order to back up everything on the disk prior to the first partition (which starts at sector 2048) I would actually have to use a bs of 512 and indicate a count of 2047. Correct?
Since the sector size is 512 bytes, that should give me the equivalent of the first 2047 sectors, correct?
dd if=/dev/sda of=/mnt/USBDrive/dd/partition-restore bs=1 count=2047 will give you 2047 bytes, not blocks, because you have set the block size to 1. Use bs=512, or just leave out bs entirely, since dd will assume 512 when you don't tell it otherwise. I think you want 2048, not 2047, as well.
There is no 'sector', 'cylinder', 'head', 'track', etc, etc, etc. None of that has been relevant for going on 20 years. Hard drives do have a block size though, of 512 bytes (and even the very newest drives, which use 4K blocks internally, still act like they have 512 byte blocks.)
34612341692783461 lines of script aren't going to help you when you don't know how to do it by hand.
I'm not familiar with sgdisk and wouldn't know how to construct commands for it. To extract the desired values form above mentioned output, try
You'd need to assign the values to e.g. an array in lieu of the echo, then.
Hi,
In our HP-UX B.11.11. I could not find dev/urandom and dev/random
Are all pseudo-devices implemented as device drivers, or in need to run /configure some package to install the package to have dev/urandom.
Please help (4 Replies)
Hello AIXians,
I can't boot my AIX, it hangs and stops at the code error: 0518
After searching google, I knew the problem is due to problems in File Systems.
So the solution is booting from any bootable media, then run these commands in maintenance mode:
#fsck -y /dev/hd4
#fsck -y... (3 Replies)
Hi,
How can i check that i am using RAW devices for storage in my AIX machine...
Also after adding a LUN from storage to a aix host, when i check /dev in the host, i can see both rhdisk and hdisk with same number
eg:
dcback1(root):/dev>ls -lrt | grep disk12
crw------- 1 root ... (4 Replies)
So, we removed a LUN from the SAN and the system is refusing to remove the references to it in the /dev folder. I've done the following:
devfsadm -Cv
powermt -q
luxadm -e offline <drive path>
luxadm probe
All those commands failed to remove the path. The drive stills shows up as <drive... (13 Replies)
Hello,
Ive got an HP LaserJet 2100 / parallel interface.
I had some troubles getting going due to non-working cups drivers. Updated cups and also used a .ppd.gz file from something HP provided. found the files here...
www.linuxprinting.org/show_printer.cgi?recnum=HP-LaserJet_2100
Anyways.... (1 Reply)
Hello,
i am using finch (unix commandline instant messaging client using libgnt) which is running connected to /dev/pts/1
Now I would like to "remote control" the program by sending the key combinations normally typed on the keyboard from a programm in another shell. So I tried:... (0 Replies)
Hi, Anyone can help
My solaris 8 system has the following
/dev/null , /dev/tty and /dev/console
All permission are lrwxrwxrwx
Can this be change to a non-world write ??
any impact ?? (12 Replies)
Please help urgently.
I need to setup up some sort of service on a solaris server on a port.
I dont need it do anything special, anything that is sent to this port from an external server should be dump to /dev/null or a flat file..
Can you help urgently? (1 Reply)