LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   How to export Customized Linux OS to USB bootable pendrive (https://www.linuxquestions.org/questions/linux-general-1/how-to-export-customized-linux-os-to-usb-bootable-pendrive-4175443832/)

eboy98 01-02-2013 11:55 AM

How to export Customized Linux OS to USB bootable pendrive
 
Hi Everyone,

I have installed a CentOS5.5. I did some configuration for apache and mysql, Now i want to export this OS to bootable usb pen drive to boot from other machine.

I know there are some tools like LiveUSBCreator which can create bootable usb pen drive from LIVE os. But that is not i am looking for.


Is it possible ?

Thank You.

hoes 01-02-2013 01:21 PM

Well, if that is not what you are looking for, than what is?

Creating a custom bootable USB drive is possible.
You could copy the system to the USB drive and use an initial ramdisk to ensure that the system mounts and starts correctly.
It isn't even that hard to do so.

What is a bit of a pickle is getting everything to work.
It depends whether you want to make a USB disk for a specific system (with constant hardware)
or a disk that works on a variety of systems (different hardware configuration).
The first option should be straightforward, but second could be cumbersome.

But this all depends on the purpose of your system.
What do you intend to do with the PEN drive, how to use it, will you use a hard drive as well, etc?

Best of luck

eboy98 01-02-2013 01:29 PM

Thanks hoes for you reply. USB PEN drive is nothing but a FLASH drive.

datasink 01-02-2013 03:44 PM

How to export Customized Linux OS to USB bootable pendrive
 
The basic problem I have always had with this is that with any computer I have, the BIOS won't boot from the usb drive. The only options for boot order are floppy drive, hard drive, or cd drive. Is it true that if that is all the options you have, you can never boot from the usb drive?

hoes 01-02-2013 04:08 PM

If that is your main problem than these links might be helpful
http://www.linuxquestions.org/questi...evices-471848/
https://help.ubuntu.com/community/BootFromUSB

Reuti 01-02-2013 04:44 PM

How old are these PCs? Booting from USB is an option for quite some while now in the BIOSes I saw in the past. Sometimes the option is only listed when at time of configuration an USB device is attached right now.

muhamed.ahmovic 01-03-2013 03:07 AM

I have made it with "dd". Insert usb flash drive in PC with your customized OS, unmout it and run "dd if=/dev/your_system_HDD of=/dev/your_flsh_drive". Which one is which you can see if u run "mount" command.

Best regards and happy new year to all...

johnbuk 01-03-2013 04:50 AM

Have you tried Plop Boot Loader? Burn to a CD, boot from that which then allows booting from a USB. I've used this successfully on old systems which don't initially have the option to boot from a USB.

Regards

lifeluvr 01-03-2013 11:57 AM

Where I learned about making flashy-pen-drives
 
http://www.pendrivelinux.com/

Night Hawk 01-03-2013 07:54 PM

Quote:

Originally Posted by eboy98 (Post 4861405)
Hi Everyone,

I have installed a CentOS5.5. I did some configuration for apache and mysql, Now i want to export this OS to bootable usb pen drive to boot from other machine.

I know there are some tools like LiveUSBCreator which can create bootable usb pen drive from LIVE os. But that is not i am looking for.


Is it possible ?

Thank You.

If you see a regular option to install you could try a dieect installation to the flash while booting live from cd/dvd. Here I install ubuntu or the Linux Mint Debian release direct to a good sized flash drive pointing the Grub loader at the device itself.

The ither idea would be creating an image file made from the installation and unpacked onto a flash drive already made bootable unless using a program that writes images to flash drives making them bootable as part of the process.

Here I create data recovery sticks by custom installing the distro being used to a smaller root partition proceeded by the larger data partition formatted to the file system for the OS on the machine data will be recovered from. If the flash drive is large enough say at least 32gb in size you can even add a small swap partition.

You might want to look over another similar thread to this about the use of Grub over trying syslinux in making the flash bootable on it's own. http://www.linuxquestions.org/questi...-stick-622632/

jefro 01-04-2013 10:55 AM

You don't need plop. Any system that is too old to run from a usb is unlikely to work well with what you want.

What you want to do is to copy your install to the usb. In most newer (but not all) distro's, a usb is treated as a real hard drive.

Two ways are normal to move systems.

One is to use cloning software such as dd or clonezilla/redobackup. That tends to fail since you are moving a larger device to a smaller device. To master a good original copy you tend to built it on the correct size to begin with. You may be able to fix it.

The second choice is to move only the changes. For example. You install a clean OS to the flash and then move the changes. Ways may include simple cut and paste or rsync.

rootaccess 01-04-2013 07:02 PM

Quote:

Originally Posted by muhamed.ahmovic (Post 4861867)
I have made it with "dd". Insert usb flash drive in PC with your customized OS, unmout it and run "dd if=/dev/your_system_HDD of=/dev/your_flsh_drive". Which one is which you can see if u run "mount" command.

Best regards and happy new year to all...

I doubt this would boot

I think what the OP is looking for is making a custom LIVE usb from a newly installed system that was installed from a LIVE environment. Correct?

Night Hawk 01-04-2013 07:30 PM

Quote:

Originally Posted by jefro (Post 4862963)
You don't need plop. Any system that is too old to run from a usb is unlikely to work well with what you want.

What you want to do is to copy your install to the usb. In most newer (but not all) distro's, a usb is treated as a real hard drive.

Two ways are normal to move systems.

One is to use cloning software such as dd or clonezilla/redobackup. That tends to fail since you are moving a larger device to a smaller device. To master a good original copy you tend to built it on the correct size to begin with. You may be able to fix it.

The second choice is to move only the changes. For example. You install a clean OS to the flash and then move the changes. Ways may include simple cut and paste or rsync.

With the present partition's size for CentOS5.5 more then likely much larger then an 8gb flash drive let's say a good 15-20gb or larger even a 32gb flash drive would be a good minimum for any cloing attempt. A larger 64gb could also be considered but these larger size flash drives also come with a much larger price tag!

The custom install allows you to see a clean install on the smaller size drives allows far more options while anything under 16gb would tend to be tight on space if you have a lot of files. With that being a somewhat large enterprise distro I would imagine a good 32gb flash drive would be a start since those run about $50US or so while the larger 64gb models fetch a hefty price. For any long term use a larger drive would be the immediate thought there.

rootaccess 01-04-2013 08:16 PM

Installing TO a flash drive takes ages and also runs the same, very slow. It isn't the same as a LIVE cd, just so you know. It took forever for me just to install BSD to my flash drive, and then it didn't even boot but Ive installed BACKTRACK to a flash and it was terribly slow. A Live USB or HD is the way to go.

Or you can learn how to convert an exising system to a Live ISO much like the default debian or any other distro has but I haven't gotten into that one yet. It does interest me. Maybe someone with more experience can chime in.

Night Hawk 01-04-2013 09:10 PM

The drawback while simply seeing any iso written to a flash drive made bootable by the program used does not allow you to "install" various apps! You are limited to the live version only. A full custom install doesn't always take that long either since a good sized example is the Debian version of Linux Mint taking about 20 minutes on average to install to a 32gb flash drive.

Once installed since that particular release comes prepackaged with some 200 options to install a lengthy list of apps immediately allows you to do just that as a regular OS install. You still run the distro custom installed to a flash drive as you would on the main drive only on a different type of drive.

The live OSed flash drive on the other hand is great for first looks and tasks like data recovery when something happens to prevent a normal startup of the machine you run and you got to have that report today! You may even fix the problem fast while booted live. Live gives you the feel of the OS but not the full functionality which becomes the drawback for long term use.


All times are GMT -5. The time now is 05:43 PM.