I'm having trouble finding info on how to convert sector size (*if that's really what i want to do?) to something easier to understand.
I'm trying to copy the MBR from a bootable SD Card to another SD Card or image file, but I'm not sure what I should use in my dd command since I'm not positive about how much space is exactly before the 1st partition...
fdisk Output:
I read on a site that you can just divide the "Start" number in half to get Kilobytes (*which means there is 1MB before the 1st partition), but I'm not positive if that is accurate or not..?
What should I use as my dd command if I want everything BEFORE the first start'ing sector at 2048 (*i.e. before the 1st partition)?
Something like this?
If any has any thoughts or suggestions it would be much appreciated.
Copying the MBR could mess up the partition table anyway. What exactly are you trying to do? Would a complete duplicate of your original be good enough?
I wish it were that easy... I'm not even sure what I want to do is possible, but here we go...
I have a bunch of CuBox's that boot off SD Cards. The CuBox's use the bootloader called U-Boot. And when I do a straight clone from one card
to another I am unable to boot the cloned SD Card. During the boot process, after the U-Boot screen, I get the error during boot log messages that says;
"Failed to find boot device"
I Believe this is because when I did the first boot of the source sd card (*the one that works), U-Boot writes data specific to that SD Card in
the u-boot.img file and also a compiled file called boot.scr. I also believe it records the Offsets, or has them pre-recorded, of the Kernel image file
that is flashed to the SDCard. The boot.scr file contains the kernel image's addr/offset for where to find it...
Another thing I tried was after I cloned the working SD Card to a new one, I mounted the cloned card to my laptop and ran the command:
Which I believe recreates the boot.scr and boot.script files (*which contains all the boot env variables and boot cmds, etc...)
Now, after I did that and I try to boot the SD Card again, I get MUCH further along in the boot process, but I then get stopped at an error message
that says this below (*the name there is the by-id name of the ORIGINAL SD Card...):
So I'm thinking the device name is getting written somewhere else in the boot partition, possibly in the zImage-3.14.14-cubox-i kernel
image file or maybe in u-boot.img file... So I thought I would try to take a fresh sd card that has had the OS image flashed to it, but has never
been booted, and copy the MBR and boot partitions from that FRESH SDCard and overwrite the MBR and boot partitions on the CLONED card
and see what happens...
I'm doing this becuase I need to configure about 15 of these CuBox's and I was hoping I could simply configure one SD Card exactly how I want it
then clone the SD Card for the other CUBox's to save A WHOLE LOT OF TIME...
I know when I change Hard Drives on my OpenSuSE laptop and I clone the HDD to a new Drive, I usually just need to edit the HDD names in GRUB and I'm
good to go, but this seems more complicated...
This depends on the hardware and the OS you use. Above info looks like its an IBM compatible PC with a 512 byte sector disk. On non-UEFI systems/disks the MBR is the first sector = 512 bytes. The gap to sector 2048 is there for historical reasons and is usually filled with zeroes unless some feature reserves it for special use.
BUT - as Corona688 says - messing with MBR and disk internals is dangerous and can leave your disks and data unusable!
Ok gotcha, I knew the MBR was definitely smaller then that full space prior to the first partition but wanted to make sure I wasn't going to miss something while copying..
As for killing the disk if I try this, that's ok, it's just a clone of the original so I can always just make another copy if it gets hosed...
So given the 512-byte sector size and start being = 2048, is that simply 1MB..?
I've had to mess with u-boot a little bit, and while it's infuriating, it hasn't appeared "magic" in quite that way. How exactly have you been cloning them? A cloned card should boot.
I have a RHEL 5.3 machine with the following partitions and free space:
Free space on the partitions
/ : 74GB
/boot : 81MB
/var : 73GB
/home : 37GB
/icat : 758MB
/opt : 1.5GB
Now is it possible to allot a free space of some other partitions to /opt? I want around 100 GB more space... (4 Replies)
Hi
I'm doing some resilience testing and need to write a script to consume all of the available disk space on a partition and then to free it up again.
This would need to be -
Safe
Dynamic, in that it calculates the free space prior to consuming it.
I might want to go on to consume a... (7 Replies)
Hi OS Experts
I would like to increase root partition from another partition so that I can save more documents in Home and Desktop. whether it is possible without formating root partition if so please explain
here is o/p of df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda9... (8 Replies)
I am planning to install slack 13.37 on an old stand-alone PIII (512 mb ram) with 17 gb disk space. I need to keep lotsa pdf, chm type e-books for programming with few other misc. documents.
I'm going to use this system for my personal use.
It has no network but I browse internet with cable... (0 Replies)
hi
My System is Sun Microsystems Inc. SunOS 5.10 Solaris
Partition Info is
/dev/vx/dsk/bootdg/var
27G 25G 1.2G 96% /var
/dev/vx/dsk/bootdg/oravol
110G 54G 56G 49% /export/home
I want to shift space 20G from /export/home to /var
What should be the command ?? (2 Replies)
Dear Friends ,
I am using Redhat Ent Linux 5.0 with a EMC storage which HDD space is 4 TB. After Installing RHEL 5 , I get 4 TB space available but when I am going to create a partition then the OS show 2TB available space . I cannot create a partition above 2TB space . Is there any limitation... (3 Replies)
Hi,
On one of our solaris servers, the root partition has filled up,(it was poorly sized in the first place), Does anyone have any advice about the best way to add space to a partition. I'm sure I've read how to do this somewhere before but just can't remember...:(
A colleague has suggested... (1 Reply)
Hello,
I am trying to monitor disk space for each node on the machine. I am able to get all individual nodes but for the '/' node. For example:
df -k:
bash-2.05b# df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/xxx 4127108 2415340 1502120 62% /
/dev/yyy ... (3 Replies)
first of all, sorry about my english...I´m a spanish newbie to this marvelous OS and i have just a couple of doubts...u know? :-)
1) how big should my swap partition be if i installed debian 2.2r3 or FreeBSD 4.x on a AMD k7 1400Mhz with 512Mb of Random Access Memory?
i heard that those OS... (1 Reply)