Jump to content

How to make a USB stick bootable (with Clonezilla)?


Cluttermagnet
 Share

Recommended Posts

Cluttermagnet

Hi, All-

 

I am planning to clone the contents of a 120GB SSD into a 240GB SSD. I'm running out of space

in my /home partition due to not making it big enough (not thinking ahead). So I have the new

SSD installed and partitioned etc. It's a carbon copy of the original partitions setup but having

much larger root and /home partitions.

 

I'd be done with this task already but for one problem- my old Dell tower seems unwilling to

support three SATA drives simultaneously. This despite having a total of 6 SATA ports on

the mobo. I couldn't figure out how to get the two SSD drives plus the DVDRW all talking at the

same time. I did get the two SSD drives going so I was able to use gparted to set up the new

SSD. But presently I don't have the ability to use a copy of Clonezilla on a CD in the DVDRW

drive. So I got the bright idea to make a bootable USB stick with Clonezilla on it.

 

My tower, BTW, is an old Dell Precision T3400 with E8500 3.16GHz dual CPU, 8GB RAM, an

old copy of Linux Mint 17.3 on it...

 

I successfully downloaded a copy of Clonezilla and safely unzipped it inside the 1GB USB

stick no problems. So all I want to do is to make that drive bootable. Found a command line

tutorial for installing Clonezilla to a flash drive but it didn't work because my file system is

set up a little different than the example given.

 

Looking for a little help, hope someone can assist. Please note this is *not* the usual scenario

of installing an ISO  image into a flash drive and making that bootable. I know in principle how

to do that and Mint has internal tools to handle that. Thanks guys!

 

Clutter

 

Link to comment
Share on other sites

I recently cloned a 480 GB SSD onto a 1 TB SSD by putting the larger drive into a USB enclosure and then using disk clone software. Then I used a partition manager to stretch the data partition. This was in Windows but you can do the same thing with Clonezilla and Gparted.

I took a while but it works. This was over USB2.

In your case you should be able to make a persistent USB copy of Linux MInt and save Clonezilla on it using The LM USB image maker. 

Link to comment
Share on other sites

securitybreach

Just use dd as its the easiest method.

 

Insert drive, make sure it isn't mounted and run the following (assuming the usb drive is sdb):

 

sudo dd bs=16M if=clonezilla.iso of=/dev/sdb status=progress && sync

 

Replace clonezilla.iso with the full path to the iso and replace sdb with the correct drive letter. You do not have to worry about extracting anything.

Link to comment
Share on other sites

Cluttermagnet

I am confused. Clonezilla comes as a zip file, not as .iso.

 

Quote

To make your USB flash drive bootable, first change the working dir, e.g. "cd /media/usb/utils/linux", then run "bash makeboot.sh /dev/sdd1" (replace /dev/sdd1 with your USB flash drive device name), and follow the prompts.

 

From here:

 

https://clonezilla.org/liveusb.php#linux-setup

 

 

I was able to unzip no problems into a 1GB USB stick, then had problems because my

file structure is a little different than the example given, so I got a lot of "no such file or command"

responses from terminal. The USB stick is definitely NOT set bootable at the moment. When

boot sequence encounters a USB device plugged in it responds "no operating system found"

Remove the stick and it boots normally into Mint 17.3.

 

Yes I changed the boot sequence to put USB at the top of the list.

Edited by Cluttermagnet
Link to comment
Share on other sites

Cluttermagnet
13 minutes ago, raymac46 said:

 

The page you link to brings me (in 2 steps) to the text I quoted above. I've been on this page, this is what I am trying to do.

And for me , the process breaks down right after I successfully unzip the zip file, located inside the USB stick, into the USB

stick. That part went fine. It fell apart when I then tried to make the USB stick bootable. That's step 5 in their tutorial.

 

BTW guys, I must emphasize there are no .iso images involved, which are the 'usual' way to get something bootable

into a USB stick. Here I imported and opened a .zip file into a USB stick formatted FAT16. Normally I'd use FAT32. The

instructions say it has to go into a partition formatted with FAT16, FAT 32, or NTFS.

Edited by Cluttermagnet
Link to comment
Share on other sites

Cluttermagnet

It might just be easier to figure out why I can''t run 3 SATA devices simultaneously.

If I had the two SSD plus  the DVDRW going all at once, I do have a CD copy of

Clonezilla, which has worked well for me in the past. Why can't I do that if I have

a total of 6 SATA jacks on the mobo? Makes no sense. I am running into some

invisible rule limiting me to 2 SATA devices max. Weird.

Edited by Cluttermagnet
Link to comment
Share on other sites

securitybreach
25 minutes ago, Cluttermagnet said:

 

The page you link to brings me (in 2 steps) to the text I quoted above.

 

Literally the first link is for the iso. I've done it this way for years.

 

Also, Ian made a tutorial on how to use clonezilla iso years ago: 

 

Link to comment
Share on other sites

Cluttermagnet

Hmmm-

 

It is going to take a while to internalize what he is saying,

but this tutorial appears more oriented to how to run Clonezilla.

I have always been able to figure out that part. Good tutorial though.

Link to comment
Share on other sites

Cluttermagnet

OK, can you show me where on the net I can obtain clonezilla as an iso?

The one I chose is bundled with Debian, I believe, but it is in the form of

a .zip extension. Like the tidal force of a black hole, this discussion keeps

getting tugged towards the .iso method of imaging. If I can find it in that

form I will adapt and install it to the stick that way. In fact, there is some

native software bundled with Mint 17 that does exactly that job: USB

Image Writer and USB Stick Formatter.

 

Edited by Cluttermagnet
Link to comment
Share on other sites

securitybreach
Quote

2. How to install Clonezilla Live ?

To install Clonezilla live, the basic steps are to download pre-build Clonezilla Live then put it in a boot media (CD, USB flash drive or USB hard drive). Two types of files are available, iso and zip. The former one is for CD, the latter is for USB flash drive. Besides, you can put Clonezilla live on hard drive or PXE server, too.

 

Link to comment
Share on other sites

Cluttermagnet

There was something he said in the tutorital that is really troubling me-

something to the effect that he says the sending and receiving partitions

must be identical in size. Can that be right? If so, that defeats my entire purpose.

What I am trying to do is to duplicate my root and /home partitions into a

2x size drive where I have room to make root and /home both a lot larger.

 

I don't want to get into any partition resizing- ever. Takes too dang long.

And my setup is very messy. I used to use extended partitions a lot. One

is present here.

 

My understanding was that cloning can take place into any larger partition

than the original partition to be cloned.  Is that so? Or must they be identical in size?

Edited by Cluttermagnet
Link to comment
Share on other sites

Cluttermagnet
7 minutes ago, securitybreach said:

Two types of files are available, iso and zip. The former one is for CD, the latter is for USB flash drive.

 

That's why I chose .zip- since they said to for a flash drive. I took them at their word.

So you are saying that was bad advice and I should have downloaded the .iso?

 

If so I will do that and then try to let the native tools in mint handle the install into the

USB stick.

Link to comment
Share on other sites

securitybreach
6 minutes ago, Cluttermagnet said:

There was something he said in the tutorital that is really troubling me-

something to the effect that he says the sending and receiving partitions

must be identical in size. Can that be right? If so, that defeats my entire purpose.

What I am trying to do is to duplicate my root and /home partitions into a

2x size drive where I have room to make root and /home both a lot larger.

 

I don't want to get into any partition resizing- ever. Takes too dang long.

And my setup is very messy. I used to use extended partitions a lot. One

is present here.

 

The destination has to be at least as big as the source.

Link to comment
Share on other sites

Cluttermagnet
Just now, securitybreach said:

 

The destination has to be at least as big as the source.

 

Right. That was my understanding, but not what he said in the tutorial.

I'm sticking with my understanding: so long as the destination partion

is the same or larger...

Link to comment
Share on other sites

Cluttermagnet

OK I will go get the .iso and start over. Guys, I am beat. Going to go get a few hours sleep.

Thanks so much for all the help! I'm pretty good at tying myself in knots...

Link to comment
Share on other sites

Cluttermagnet

Formatting and burning the .iso onto the USB stick was very easy, 5-10 minutes

including download time. Bbl, thanks...

 

Clutter

 

  • Agree 1
Link to comment
Share on other sites

securitybreach

BTW, you do not have to format the drive if you are burning the ISO to it since it overwrites the drive anyway.

Link to comment
Share on other sites

On the subject of SSD I assume you have successfully connected a known good SATA data cable to the mobo and a SATA power cable from your power supply. Duh.

Then check in the BIOS settings to see if all drives are recognized. I had a problem with this last time I cloned a new drive and reset the BIOS to default settings. After a reboot everything was OK.

 

  • Agree 1
Link to comment
Share on other sites

Cluttermagnet

I made rapid progress once I moved to the .iso method. Later I did a cloning of my drive to the other drive,

both SSD drives. (Using my newly burned 1GB USB stick with Clonezilla Live on it)

 

I would class this as 'semi successful'. While the clone was perfect and the larger SSD was also bootable,

Clonezilla ignored my larger partitions on the target drive and shrunk them to agree perfectly with the

source drive. Not at all what I wanted! Raymac mentioned earlier "us(ing) a partition manager to stretch

the data partition". I was hoping to avoid this. BTW Clonezilla did the very same thing to me before, about

a year or two ago.

 

I'm going to have to investigate and see whether I can figure out how to do this partition by partition

instead of drive to drive. Then if I run into the shrinking, I can at least correct it partition by partition

using gparted. I mean Clonezilla shrunk not only 3 partitions on me, but also the extended partition

around them. Yikes!

 

Clutter

 

P.S. I still have a non-functional DVDRW drive in this tower. Tried swapping cables already but no help.

Good suggestion though. I did not yet investigate whether I have to go into the BIOS to tell the OS that

I've monkeyed with the number of storage devices. Will look into that too. Thanks for that tip, Raymac.

Maybe the computer was not designed to sense such changes dynamically, boot to boot.

 

So I ended up cleaning up an almost empty 32GB USB stick and burned a copy of Linux Mint 20.1

into it. Used that later in a live session to reformat my bigger 240GB SSD that Clonezilla had messed up.

Re-did all the partitions again. Later I will try to clone partition by partition...

 

 

Edited by Cluttermagnet
Link to comment
Share on other sites

The simplest solution is to clean up the cloned disk by using a LIve GParted USB and stretching the partitions as needed. I have done this in Windows. I don't know how a partition by partition clone would go but I would worry about messing up the bootloader. I suspect doing such an operation would be a disaster in Windows.

Edited by raymac46
Link to comment
Share on other sites

Cluttermagnet
20 hours ago, raymac46 said:

The simplest solution is to clean up the cloned disk by using a LIve GParted USB and stretching the partitions as needed. I have done this in Windows. I don't know how a partition by partition clone would go but I would worry about messing up the bootloader. I suspect doing such an operation would be a disaster in Windows.

 

Bingo! You are right on target with that comment. I have indeed been trying to

clone partition by partition and that isn't working,. I have yet to produce a

bootable drive that way. And yet I did make one version that can be coaxed

into booting using a live session of SystemRescue 8.01 on a USB stick.

 

So yes, doing it partition by partition does work but messes up the bootloader

on the cloned drive. My original drive is still OK.

 

I have beat my brains out for 3-4 days now, part time. My current plan of action

is to do a disk to disk clone and make sure Clonezilla produces a bootable

cloned drive. Having that as insurance, I'll then try to do surgery on my original

SSD drive. I have to first delete three FAT32 partitions at the 'top'

addresses, then delete the extended partition around the OS, then move

/home up *and* expand it, ditto for the swap partition, which is too small,

and finally expand my root partition to fill the space opened up. It is a lot!

No idea if I can pull it off, bit I'll try.

 

All this on an old machine with an old OS, Mint 17.3. Why all the trouble,

you might ask? I have an instance of qortal successfully running on this

particular box. It's a blockchain network. Research it if interested. So for

now I choose to continue to work with this obsolete OS. All my other Dell

towers have Mint 18 or 19. Soon I'll move most of them to Mint 20.1.

 

My head is 'sore' from all the wall banging but I will soldier on. I assume

that at some point I will eventually succeed...

 

Clutter

 

P.S.I'd like to take your suggestion and work on the cloned drive,

tugging everything around- but first I have to remove the 3 FAT32

partitions at the top. Thus my need for a bootable clone. Having that

insurance, I would be confident enough to delete the FAT32 partitions.

Then, if that doesn't screw up booting on the original drive, I'd also

have to lose the extended partition around the OS. If I get that far,

then I clone it over my insurance copy on the clone drive. OTOH if

things blow up so far as bootability, I always will have the option to

clone the clone copy back onto the original drive and start over.

In theory, anyway...

 

Edited by Cluttermagnet
Link to comment
Share on other sites

I would think it is possible to shrink the larger partitions from the bottom (or top) and then just expand or move the other partitons as needed. As long as the drive you are messing with is unmounted it should work OK. I assume your data is backed up and you are using GParted on a thumbdrive or DVD if it's working now.

I don't know what the FAT32 partitons are for but if they are involved in UEFI then you are going to have an issue. I can't see you using EFI or GPT on such an old machine though.

Also I don't know why you bother building the partitions ahead of your clone since Filezilla or any cloning software is just going to redo it all as part of the cloning process.

I have long ago given up trying to be elegant with all this partitoning and just go with /swap and  /, or /boot/EFI, /swap and / in the case of EFI machines. I wonder about using /swap these days given that I have tons of RAM and never use swap.

Link to comment
Share on other sites

Actually, if you are running Mint, there is a much easier way to get a bootable clonezilla USB stick.  First of all, ignore what the Clonzilla download page says about using the zip file for USB.  Instead, download the iso file.  Mint has a built in app for creating a bootable USB from an ISO.  Open the file manager and right click on the iso file.  Choose the second option "Open with"  and choose "Disk Image writer".  Plug in the USB stick and choose it as the destination and restore it.  You now have a bootable USB stick with Clonezilla.  I recommend doing the same thing with a Gparted iso.  Then you can clone the first partition, boot the Gparted stick and resize that partition to what you want.  Then reboot Clonezilla and do the same thing with the second partition.  That way you avoid having to move the second partition, which is very time consuming, in order to enlarge the first partition.  You will probably have to boot the original drive in order to install grub2 on the new one.

  • Thanks 1
Link to comment
Share on other sites

Cluttermagnet
On 3/30/2021 at 4:29 PM, Bookmem said:

Actually, if you are running Mint, there is a much easier way to get a bootable clonezilla USB stick.  First of all, ignore what the Clonzilla download page says about using the zip file for USB.  Instead, download the iso file.  Mint has a built in app for creating a bootable USB from an ISO.  Open the file manager and right click on the iso file.  Choose the second option "Open with"  and choose "Disk Image writer".  Plug in the USB stick and choose it as the destination and restore it.  You now have a bootable USB stick with Clonezilla.  I recommend doing the same thing with a Gparted iso.  Then you can clone the first partition, boot the Gparted stick and resize that partition to what you want.  Then reboot Clonezilla and do the same thing with the second partition.  That way you avoid having to move the second partition, which is very time consuming, in order to enlarge the first partition.  You will probably have to boot the original drive in order to install grub2 on the new one.

 

That is a good suggestion and it turns out that is exactly how I ended up doing things.

I did eventually remember the Linux Mint native utility that burns .iso to flash drives.

I did Clonezilla that way, then Mint 20.1, which I used a lot doing partition work on

unmounted disks using gparted in the ensuing days. One last utility that went on a

USB stick was SystemRescue-8.01. This amazing utility was able to mount a copy

of a cloned disk that I had done partition by partition, and which was otherwise

unbootable. (later it got written over)

 

I spent 3-4 days part time beating my brains out on this 'simple' task, but ultimately

Raymac's strategy was the one that worked: clone the present drive from a 120GB
SSD onto a 240GB SSD- disk to disk. Working in 'expert mode' in Clonezilla I was able

to produce bootable disks. Then a lot of tugging partitions around, resizing partitions,

and deleting the several unneeded FAT32 partitions up in himem- all with the help of

gparted in Mint 20.1 live sessions. Gparted is without doubt my all time favorite

Linux utility- graphical UI, easy to use, intuitive...

 

Oh BTW Clonezilla handled duplicating grub and partition tables from the

source drive just fine. I think the key is running it in Expert mode and paying very

close attention to the options that scroll by...

 

So ultimately I did get the job done and was able to greatly stretch the size of my

/home partition- 2.8 x, with enough uncommitted space above to stretch it again

up to ~5x if I ever need to. I had come within ~800M of running out of space.

I had not foreseen just how much space would be needed when running a node on

a blockchain network.

 

Thanks everyone for the help!

 

Clutter

 

  • Agree 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...