LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Puppy (http://www.linuxquestions.org/questions/puppy-71/)
-   -   Error: invalid or damaged bootable partition, when booting from USB. (http://www.linuxquestions.org/questions/puppy-71/error-invalid-or-damaged-bootable-partition-when-booting-from-usb-618494/)

tarekahf 02-04-2008 12:19 AM

Error: invalid or damaged bootable partition, when booting from USB.
 
I created a bootable Puppy Linux on USB Flash Disk by following the instructions on the Puppy Linux Web Site.

I used Windows XP DELL Laptop (new and powerful laptop) to create the Live CD, and then create USB Bootable Image from "Menu/Setup/Puppy Universal ...."

I first tried to use the Bootable USB on the same DELL Laptop, so I press "F12" while booting, and choose to boot from USB. After I press Enter, I get this error:

invalid or damaged bootable partition

I tried the same USB on my new Eee PC from Asus, and it worked successfully without any problem.

While I was making the Bootable USB, I get some messages from Puppy Linux that if it does not work, then I can try using a different MBR by copying it from somewhere, but I cannot remember exactly what to do now.

Can anyone help me to resolve this problem.

Tarek.

rarsa 03-17-2008 01:57 PM

The easiest way to "remember" is to run the wizard again up to that point.

The wizard will not actually write to the device until the last step.

I recommend trying with mbr.bin first

tarekahf 03-18-2008 01:37 AM

Thanks a a lot. I will try that and let you know how it goes.

I wonder if you could help me with this.

I am using this Bootable USB mainly to perform Full System Backup of my Eee PC using "dd" from command line. So, I do that manually.

I am looking for a simple method to automate this process. I am not bad in bash programming, and with some help, I think I can make it, or if there is a tool, that will be great too !

Following are the main feature of the Backup Tool I am looking for:

1. Initiate the Backup while I am booted from the Eee as usual. Meaning, I carry out some command, that will write some flags on the USB, and when booted on USB under PuppyLinux, it will carry out the "dd" command automatically. Once completed, just clear the flags.

2. Using Automated Naming Convention with the option to add comments the be attached to the new Backup.

3. When Booted on USB under Puppy, the Script responsible for backup should start automatically (just like 'autoexec.bat' from MS DOS Days). This script will check the status flags on the USB and read some config parameters to decide where to do the backup, mount the External Drive if needed, do the required validation, ask to user to add comments and start the backup.

4. Generate some logs to indicate the status of the backup and save them in normal log file using similar naming convention, or in one big log file for all backups, depending on the parameteres in the config file on the USB.


That is what I am looking for.

Any help will be greatly appreciated.

Tarek.

rarsa 03-18-2008 10:54 AM

Here are my thoughts

dd is OK but why not use partimage?

Or even better why not just backup your MBR once using dd or partimage and then every time you boot from the USB doing (assuming that your eee drive is identified as sda1 and that you have a large enough pupsave file)

Code:

filename=<here you set the name based on a naming standard>

mount /dev/sda1 /mnt/sda1
cp -auxv /mnt/sda1 /root/backup > /mnt/home/${filename}.log
mksquashfs /root/backup /mnt/home/${filename}.sfs

the -auxv means "copy all attributes, just copy modified or new files, don't go into other mounted file systems, tell me what you are doing"

This way you;
  • Speed up the backup as its only done incrementally
  • Always have a readily available copy of your last backup.
  • Keep your backups accessible as squash file sytems

You have two main places where you can call this script from:

If you call it from /etc/rc.d/rc.local
It will execute at boot but any prompt you do for "comments" on the console

If you call it from /root/.xinitrc
It will execute as soon as the graphical environment starts and you can then prompt graphically for comments.

Of course my little script is just a guide, you can replace cp with dd or partimage and you'll have to add the logic.

I hope this hints help.

tarekahf 03-19-2008 03:56 AM

rarsa,

Oh, where were you ?! I was looking person who has such knowledge.

Yes... this is the kind of thinking I had in mind, but I am lacking the knowledge in Linux.

Please allow me to ask questions with regards to this subject "Automate Full Backup":

1. partimage is a command similar to dd ?

2. MBR once using dd or partimage ?

3. I want to backup the Entire Drive while booted from USB, becuase I was told that I have to boot from external drive to make such full backup to ensure no writes are being made and the backup is in a consistent state. Is this ture ?


4. What is "squash file sytems " ? Can you give me some links on the net to do some reading on this subject ?

5. Using script, what is the best way to Read Variables from a config file, in the format:

[SECTION]
PARAMETER NAME = PARAMETER VALUE


6. Is there a command that will reboot the Eee ?


Tarek.

rarsa 03-19-2008 09:09 AM

I'd recommend googling to get the full scoop on partimage, and squash file systems.

Quote:

Originally Posted by tarekahf (Post 3093547)
1. partimage is a command similar to dd ?

It's a command to make full partition images

Quote:

Originally Posted by tarekahf (Post 3093547)
2. MBR once using dd or partimage ?

The MBR is your boot sector, I thought that you cared about it, otherwise why backing up with dd?

Quote:

Originally Posted by tarekahf (Post 3093547)
3. I want to backup the Entire Drive while booted from USB, becuase I was told that I have to boot from external drive to make such full backup to ensure no writes are being made and the backup is in a consistent state. Is this ture ?

Technically speaking yes. The safest way is booting to RAM.

Practically speaking it depends on what you want to backup. If you just want to backup data, then the answer is "not necessarily" as long as the files that you want to backup are not open.

Quote:

Originally Posted by tarekahf (Post 3093547)
4. What is "squash file sytems " ? Can you give me some links on the net to do some reading on this subject ?

Google "squash file system"
http://squashfs.sourceforge.net/

Quote:

Originally Posted by tarekahf (Post 3093547)
5. Using script, what is the best way to Read Variables from a config file, in the format:
[SECTION]
PARAMETER NAME = PARAMETER VALUE

Why the "Section" you can just create a file with namevalue pairs and execute it from your script.


Quote:

Originally Posted by tarekahf (Post 3093547)
6. Is there a command that will reboot the Eee ?

Code:

shutdown -r now
http://unixhelp.ed.ac.uk/CGI/man-cgi?shutdown+8


Remember, Web searches are your friends. Use them as much as you can


All times are GMT -5. The time now is 12:17 AM.