Tiny Core Linux

General TC => Tiny Core Netbooks => Topic started by: Mike7 on December 18, 2013, 01:28:20 PM

Title: Setting up a pendrive for installation of TCL with core2usb
Post by: Mike7 on December 18, 2013, 01:28:20 PM
Hi, folks!

Before attempting to install CorePlus on my pendrive, I want to make sure I have the pendrive set up correctly.

Back in March, Béla wrote:
Quote
Create a relatively small FAT or FAT32 partition (256M) as first partition for. Use remaining part as EXT and SWAP LINUX partitions later created with TC when it is up and running.

Now, I am going to install on an 8G pendrive. Should I create a 256M fat 32 partition and just leave the rest of the pendrive alone?

Can I use Gparted in PuppyLinux (my current OS) to create this boot partition, or must I do it in Windows?

Do I need to flag this small partition as bootable when I create it?

In the wiki (http://wiki.tinycorelinux.net/wiki:partition) it says:
Quote
When installing on a USB drive, or other solid state memory, one partition is recommended for one version of Linux, that is a root partition. This is usually formatted with the Ext2 filesystem, which is a non-journalling filesystem, to minimize writing, and lengthen the life of the memory. Do not put a swap partition on a USB drive or other solid state memory, as it will result in writing a huge amount to the drive, and greatly shorten the life of the drive.

This seems to conflict with what Béla said.

What does it all mean, in practical terms? Should I create a 256M bootable partition formatted in FAT32, and a second 7.744G partition formatted it in ext2? But that isn't possible in Windows, is it?

If I don't format in ext2, will the life of the pendrive be shortened by constant journalling?

As a solution to this problem (if it is a problem), should I try to install TCL on the pendrive from my PuppyLinux OS, instead of using core2usb.exe in Windows? Or is that unnecessary, because TCL creates ext2 partitions on the pendrive once it's installed?

I'm confused. Can someone help me out? Rich? Curaga? Béla? Anyone?

Thanks!

Mike


Title: Re: Setting up a pendrive for installation of TCL with core2usb
Post by: gerald_clark on December 18, 2013, 02:09:34 PM
There many ways to install core.
http://wiki.tinycorelinux.net/wiki:start#installing

If you don't need to access the thumb drive from Windows, the easiest is to boot the CorePlus CD and run the installer to install to the thumb drive.
Title: Re: Setting up a pendrive for installation of TCL with core2usb
Post by: bmarkus on December 18, 2013, 02:19:58 PM
If you are on a Linux machine, no need for core2usb. It is a Windows-only installer for newcomers with no Linux.
Title: Re: Setting up a pendrive for installation of TCL with core2usb
Post by: Misalf on December 18, 2013, 02:34:16 PM
I don't think there is one correct answer about what kind of partition layout to use. It depends on your needs.

One advantage of using fat32 for the boot partition is that you would be able to edit/repair it from within Windows (f.e. bad boot entry in bootloader config). It might also help to even boot on some BIOS'es (size might pe important as well).

Yes, you can use GParted from within Puppy.

On whichever partition you install the bootloader, this one should be bootable. The actual OS can be located at another partition on that drive.

You can boot Core from a FAT32 partition. However, you might want to exclude some files from your Backup and store them elsewere on the disk (instead of  ~/home/$USER ). Doing so on a Windows partition those files would loose their permission flags.

EXT2 does not do as many read/write to disk compared to EXT3/4 so flash memory can live longer.

Creating a Swap partition on a flash drive really is no good idea. Even though I rarely see TinyCore using any swap at all (actually only when I compile software).
The good news is Core uses some amount of real RAM and uses this as compressed swap (can be disabled by using  nozswap  boot code).

I never tryed core2usb.exe.

--

If you want to use this pendrive for storing files in Windows as well, you might want to make the first partition the biggest (like 6GB or so) because Windows doesn't show you any partition after the first one - even if also formated in a Windows friendly filesystem.
Title: Re: Setting up a pendrive for installation of TCL with core2usb
Post by: bmarkus on December 18, 2013, 03:34:38 PM
My advice is to have a small FAT partition just to boot and change data with WINDOWS (64-128MByte) and a second EXT4 partition with /tce for normal Linux/TC use. Never use ext2, just a journaling file system. Modern USB sticks has rather long lifetime and a built-in mechanism to distribute writes over the drive. I'm using a lot and have rather old sticks but never had any failed. But had corrupted file systems where ext4 saved my life but with ext2 would have lost few month work. Also, USB sticks are cheap.

With larger drives (say 8GB or up) I'm using a third or more partition as a backup for less frequently used data.
Title: Re: Setting up a pendrive for installation of TCL with core2usb
Post by: Mike7 on December 18, 2013, 03:51:29 PM
Hi, Gerald.

Quote
There many ways to install core.
http://wiki.tinycorelinux.net/wiki:start#installing

Unfortunately, most of the information in that wiki is for people who either have a CD drive or TCL already installed on their hard drive. I have neither.

What I have is an Asus eeePC 1000HA netbook with no optical drive and Windows XP on the hard drive. I also have an old version of Puppeee Linux 4.4 on a bootable pendrive, which I am now using as an OS because the Asus HDD is getting old and weak.

Quote
If you don't need to access the thumb drive from Windows, the easiest is to boot the CorePlus CD and run the installer to install to the thumb drive.

I don't need to access the thumb drive from Windows. But I have no CD drive. What I'm trying to figure out is the best way to install CorePlus on a pendrive using core2usb in Windows. That is, how to partition the pendrive before running core2usb. Or alternatively how to install from PuppyLinux (I have no idea at all how to do that).

Cheers!

Mike
Title: Re: Setting up a pendrive for installation of TCL with core2usb
Post by: Mike7 on December 18, 2013, 04:01:26 PM
Hi, Béla.

Quote
If you are on a Linux machine, no need for core2usb. It is a Windows-only installer for newcomers with no Linux.

I have very little experience with or knowledge of Linux. I have been using PuppeeeLinux because it's the only Linux I was able to make a stick from that boots. But I have no idea how to use it to install CorePlus onto another stick.

Some people say I can just dd the iso to the pendrive. But other people say no. Same for using Unetbootin-for-Linux.

Any suggestions?

Cheers!

Mike
Title: Re: Setting up a pendrive for installation of TCL with core2usb
Post by: Mike7 on December 18, 2013, 05:01:20 PM
Hi, Misalf.

Quote
One advantage of using fat32 for the boot partition is that you would be able to edit/repair it from within Windows (f.e. bad boot entry in bootloader config).

I think I can probably figure out how to edit TCL files from within TCL. At least, I've been able to edit a couple of PuppyLinux system files using the terminal it has.

Quote
It might also help to even boot on some BIOS'es (size might pe important as well).

Yes, those could be important considerations. The PuppyLinux stick I have was created in Windows and boots fine. But it creates Linux partitions as part of a complicated boot process. I wonder if TCL will do the same thing?

Quote
One advantage of using fat32 for the boot partition is that you would be able to edit/repair it from within Windows (f.e. bad boot entry in bootloader config).

I think I can probably figure out how to edit TCL files from within TCL. At least, I was able to edit a couple of PuppyLinux system files using the terminal it has.

Quote
Yes, you can use GParted from within Puppy.

That's a relief. Strange as it may sound, I never could figure out how to create partitions and format them separately in Windows. Of course, I never got the hang of using the Windows terminal for things like diskpart. I'm strictly a user <grin>.

Quote
On whichever partition you install the bootloader, this one should be bootable. The actual OS can be located at another partition on that drive.

Sorry, you'll have to excuse me, but I really have no idea what this means. I don't know what a bootloader is, to be perfectly frank, and I can't see how an OS could work in a separate partition. I know, I need to go off and study computers and Linux for a year or two.

Quote
You can boot Core from a FAT32 partition. However, you might want to exclude some files from your Backup and store them elsewere on the disk (instead of  ~/home/$USER ). Doing so on a Windows partition those files would loose their permission flags.

Well, I don't know yet what a TCL Backup is. But it sounds like a bad idea to have the whole pendrive formatted in FAT32, right? So I'm afraid we're back to my original questions about just what partitions to make on the pendrive before doing the installation to it,  and what format to make them.

How about this: If I create a small FAT 32 partition for TCL and leave the rest of the pendrive alone, as Béla originally suggested, would TCL then be able to re-format the rest of the pendrive once it's running?

Quote
EXT2 does not do as many read/write to disk compared to EXT3/4 so flash memory can live longer.

I understand that. The big question is if I can make the bootable TCL pendrive in Windows using core2usb, and then somehow have the rest of the pendrive - the persistence files and backup - in ext2.

Quote
Creating a Swap partition on a flash drive really is no good idea. Even though I rarely see TinyCore using any swap at all (actually only when I compile software).
The good news is Core uses some amount of real RAM and uses this as compressed swap (can be disabled by using  nozswap  boot code).

Yes, I've gotten the idea from reading that swapping on a pendrive is out. Too many writes. PuppyLinux avoids it by putting everything in RAM at the boot, and only saving new stuff to a save.sfs file at shutdown. Maybe TCL can work that way, too.

Quote
I never tryed core2usb.exe.

Me neither, yet. But I intend to, if I can just figure out how to partition this darn pendrive <grin>.

Quote
If you want to use this pendrive for storing files in Windows as well, you might want to make the first partition the biggest (like 6GB or so) because Windows doesn't show you any partition after the first one - even if also formated in a Windows friendly filesystem.

Thanks. That's very useful information, even if I don't plan to use the pendrive for any Windows stuff. I had a bad experience trying to make a copy of a list of some of my PuppyLinux files in Windows. The pendrive wouldn't boot any more and I had to re-install. I lost the Puppy save file. So I'm permanently scared off of ever using a Linux pendrive in Windows.

Thanks for your help.

Cheers!

Mike
Title: Re: Setting up a pendrive for installation of TCL with core2usb
Post by: Mike7 on December 18, 2013, 05:57:15 PM
Hi again, Béla.

Quote
My advice is to have a small FAT partition just to boot and change data with WINDOWS (64-128MByte) and a second EXT4 partition with /tce for normal Linux/TC use.

Are we still talking about installing with core2usb? If so, how do I create the ext4 partition? Should I create the two partitions by running Gparted on the stick from within Puppy, and then do the installation from Windows? Or can I make the ext4 partition later using TCL? (Everything I've read says not to mess around with partitions after OS installation.)

Don't I still have to install all of CorePlus (71M) into the FAT partition? Or will core2usb give me an option to put just essential boot files there?

Why would I need to change data with Windows? You mean during the installation process?

Quote
Never use ext2, just a journaling file system. Modern USB sticks has rather long lifetime and a built-in mechanism to distribute writes over the drive. I'm using a lot and have rather old sticks but never had any failed. But had corrupted file systems where ext4 saved my life but with ext2 would have lost few month work. Also, USB sticks are cheap.

I'm gonna take your word on this, Béla, but I think it needs more discussion. If you're right, then someone should edit the wiki, which says to use ext2.

Personally, I don't trust these pendrives, even the newer ones. It just takes one bad spot on the chip to ruin the whole stick, I've been told. And the last thing I need is to lose a complex configuration, plus backup, due to hardware failure.

Doesn't TCL permit working in RAM, with no writing to the stick and no swapping except at shutdown?

Quote
With larger drives (say 8GB or up) I'm using a third or more partition as a backup for less frequently used data.

That makes sense. I think it also makes sense to use a separate pendrive for large files. With 32G pendrives selling for ten dollars, why keep stuff on the OS stick? Except maybe when access time is especially important.

Anyway, I still don't have a clear plan for partitioning my 8G pendrive, and whether to use core2usb or try to install from Puppy.

Maybe what I should do is make a few experiments, but I don't know where to begin. When I installed Puppeee 4.4 on a 4G stick, I didn't create any partitions beforehand. The result is that I can't use most of the 4G any more. There must be some way of re-partitioning the Puppy stick without losing what's already on it, but nobody at the Puppy Linux forum could tell me how. And the prevailing wisdom is to make all your partitions before installing the OS.

I want to get it right with TCL. I'm pretty sure it's the right OS for me, and I don't want to have to re-do it once I've got it running.

Cheers!

Mike
Title: Re: Setting up a pendrive for installation of TCL with core2usb
Post by: gerald_clark on December 18, 2013, 06:29:52 PM
CorePlus is an installer image.
You can use dd from puppy to copy the CorePlus ISO to a small ( 128M or larger ) Flash drive.
You can then boot that flash drive and use it to do a regular install to another flash drive.
Title: Re: Setting up a pendrive for installation of TCL with core2usb
Post by: coreplayer2 on December 18, 2013, 06:38:33 PM
As you can see, there is no shortage of idea's or methods.

Why not install core2usb on WinXP (the OP has WinXP on the net-book right?) then use it to install coreplus to the usb,  seems to be the quickest method to me.
Title: Re: Setting up a pendrive for installation of TCL with core2usb
Post by: bmarkus on December 18, 2013, 06:46:16 PM
Make it easy.

1) Create a 64MByte FAT partition on the USB stick with WINDOWS
2) Install Core or TC on WINDOWS with core2usb

It will leave intack partitions, just copies files and installs a bootloader (syslinux). It is safe. Forget CorePlus. To be honest I have never used, most people do not need it.

Now your stick is ready to use. Just boot your PC from the newly created stick. Partitioning of remaining part of the stick can be done native with fdisk and you can create /tce on a new Linux partition. Reboot and start using it.
Title: Re: Setting up a pendrive for installation of TCL with core2usb
Post by: Mike7 on December 18, 2013, 08:40:42 PM
Hello, Gerald.

Quote
CorePlus is an installer image. You can use dd from puppy to copy the CorePlus ISO to a small ( 128M or larger ) Flash drive. You can then boot that flash drive and use it to do a regular install to another flash drive.

Hmmm. Sounds good, but I can see problems. Don't get me wrong, I'd certainly like to give this a try. But:

- Is CorePlus an isohybrid image? If not, it won't work . Or so I've been told. As a matter of fact, someone in this forum told me back in March that the Multicore iso was the only TCL iso that could be successfully dd-ed onto a flash drive and boot it.

I have dd-ed a number of Linux iso's, even proven isohybrid ones, to flash drives and none of them were bootable. I don't know why. Maybe something about the MBR, since PuppeeeLinux has a special MBR writer that is run from the pendrive first, after the unpacked iso files are copied to it, and which makes it bootable.

(Yes, my computer can boot flash drives, since it boots PuppeeeLinux and Kaspersky Rescue Disk on flash.)

- This still doesn't answer my original questions about how the flash drive for the final installation should be partitioned and formatted.

Cheers!

Mike
Title: Re: Setting up a pendrive for installation of TCL with core2usb
Post by: gerald_clark on December 18, 2013, 08:53:17 PM
The CorePlus ISO is an isohybrid image.
Puppy's MBR has nothing to do with it.  You don't copy an MBR to the thumb drive.
You copy the CorePlus ISO image to the thumb drive.
dd if=the-coreplus.iso of=/dev/sdx
Title: Re: Setting up a pendrive for installation of TCL with core2usb
Post by: Mike7 on December 18, 2013, 08:58:47 PM
Hi, coreplayer2.

Quote
As you can see, there is no shortage of idea's or methods.

Yes. An understatement, for sure <grin>.

Quote
Why not install core2usb on WinXP (the OP has WinXP on the net-book right?) then use it to install coreplus to the usb,  seems to be the quickest method to me.

I have core2usb.exe, and I've gone through the compatibility issues here. What I'm trying to work out now is the best way to partition and format the final pendrive before doing the installation (whether by core2usb in Windows XP or dd in Linux).

I'm not really looking for problems, although it might seem that way. I've read in many places, and have experienced myself, that it just isn't a good idea to try and make new partitions and new formatting on a pendrive after installing Linux on it. At the same time, it doesn't make sense to me to install TCL on an 8G pendrive that has only one partition. Maybe I'm wrong about this. But, like I said earlier, I've lost the use of half my 4G pendrive with PuppeeeLinux on it by not partitioning properly beforehand. When I tried to make a new partition, the pendrive would no longer boot and I had to wipe it and do a whole new installation.

So I'm trying to solve these issues now, rather than suffer the consequences later.

Cheers.

Mike
Title: Re: Setting up a pendrive for installation of TCL with core2usb
Post by: Juanito on December 18, 2013, 09:16:57 PM
One more item to consider is that if you install the windows driver for linux filesystems at http://www.ext2fsd.com/ you don't need to have any windows partitions on your usb stick.

You will only be able to read/write in windows to the first partition on the usb stick, but this has worked for me without problems for years.

[caveat - and you can probably safely ignore this - the above is true for bios boot usb sticks, if you use efi boot usb sticks, the first (efi) partition must be a windows filesystem]

Amazing, but perhaps not surprising, that after all this time windows still cannot access more than one partition on a usb stick, even if all the partitions are windows file systems...
Title: Re: Setting up a pendrive for installation of TCL with core2usb
Post by: Mike7 on December 18, 2013, 09:25:36 PM
Hi.

Quote
Make it easy.

Nothing is easy, Béla. <grin>.

Quote
1) Create a 64MByte FAT partition on the USB stick with WINDOWS
2) Install Core or TC on WINDOWS with core2usb

It will leave intack partitions, just copies files and installs a bootloader (syslinux). It is safe. Forget CorePlus. To be honest I have never used, most people do not need it.

Now your stick is ready to use. Just boot your PC from the newly created stick. Partitioning of remaining part of the stick can be done native with fdisk and you can create /tce on a new Linux partition. Reboot and start using it.

Worth a try, although I still have doubts about making new partitions once TCL is installed.

I'm sure some nice person here will explain to me later how to install and set up wireless on Core, right?

Mike
Title: Re: Setting up a pendrive for installation of TCL with core2usb
Post by: Juanito on December 18, 2013, 09:39:16 PM
I'm sure some nice person here will explain to me later how to install and set up wireless on Core, right?

Getting off-topic, but if you're lucky you just need to install the wifi extension and things will work.

Unfortunately, due to many suppliers not supporting linux, more effort is usually needed and there are many threads in these forums on the subject.
Title: Re: Setting up a pendrive for installation of TCL with core2usb
Post by: Misalf on December 18, 2013, 10:41:56 PM
Hmm, is there a way to check if a flash drive is 'ext3/4 capable'?

--

What about just copying TinyCore files on the flash drive alongside puppeee, in a /tce folder, and using the already present bootloader? You might be able to just edit the bootloaders config file to boot Core Linux.
There surely is one installed already while Puppeee is currently booting from that stick.

Quote
Sorry, you'll have to excuse me, but I really have no idea what this means. I don't know what a bootloader is, to be perfectly frank, and I can't see how an OS could work in a separate partition.
If a drive is bootable, the computer executes code from the MBR, which is/starts the bootloader so we can choose to boot files from the disk (kernel).


It's not possible to edit the partition where the currently running OS is installed on. Well, it might be possible in cloud mode if the drive can be unmounted but there would be only one single chance.

Resizing partitions can cause problems, yes. But creating partitions in unformated free space, I think, is pretty much save.
Title: Re: Setting up a pendrive for installation of TCL with core2usb
Post by: Mike7 on December 20, 2013, 08:27:06 AM
Hi, all. I'm still here but I have to deal with health issues for a few days. I'll get back to this thread as soon as I can.

Cheers!

Mike
Title: Re: Setting up a pendrive for installation of TCL with core2usb
Post by: Mike7 on December 22, 2013, 09:38:33 AM
Hi, Gerald.

Quote
The CorePlus ISO is an isohybrid image. Puppy's MBR has nothing to do with it.  You don't copy an MBR to the thumb drive. You copy the CorePlus ISO image to the thumb drive. dd if=the-coreplus.iso of=/dev/sdx

Okay. I won' t mess with the MBR.

Previously, you wrote:

Quote
CorePlus is an installer image. You can use dd from puppy to copy the CorePlus ISO to a small ( 128M or larger ) Flash drive. You can then boot that flash drive and use it to do a regular install to another flash drive.

Can you explain for me what the difference is between a dd install of an iso and a regular install? In simple terms, if that's possible. It would help me understand what's going on.

Thanks.

Cheers!

Mike
Title: Re: Setting up a pendrive for installation of TCL with core2usb
Post by: Mike7 on December 22, 2013, 09:44:41 AM
Hi, Juanito.

Quote
One more item to consider is that if you install the windows driver for linux filesystems at http://www.ext2fsd.com/ you don't need to have any windows partitions on your usb stick. You will only be able to read/write in windows to the first partition on the usb stick, but this has worked for me without problems for years.

Thanks for the tip. I downloaded the file and plan to install it and see how it works as soon as time permits.

Cheers!

Mike
Title: Re: Setting up a pendrive for installation of TCL with core2usb
Post by: Mike7 on December 22, 2013, 10:05:47 AM
Hi, Misalf.

Quote
What about just copying TinyCore files on the flash drive alongside puppeee, in a /tce folder, and using the already present bootloader? You might be able to just edit the bootloaders config file to boot Core Linux.
There surely is one installed already while Puppeee is currently booting from that stick.

Interesting idea, but I don' t think I'm ready for it yet. Too complicated for me, and I'm afraid of doing something that might make the Puppeee drive unbootable. But I'm adding it to my list of possible pendrive installation methods, all of which I intend to try at some point.

Quote
If a drive is bootable, the computer executes code from the MBR, which is/starts the bootloader so we can choose to boot files from the disk (kernel

Thank you for this explanation. I really want to understand how it all works.

Quote
creating partitions in unformated free space, I think, is pretty much safe.

I hope so <grin>.

M.
Title: Re: Setting up a pendrive for installation of TCL with core2usb
Post by: Mike7 on December 22, 2013, 10:42:23 AM
Hi, all.

I succeeded in installing CorePlus-5.1 to a pendrive and booting it. Kudos for me and everyone helping me here.

This is what I did:

I had an old 1G pendrive around, so I re-formatted it as one FAT32 partition using G-parted in PuppeeeLinux, and set the boot flag.

Then I went to the terminal and did

dd if=CorePlus-5.1.iso of=/dev/sdc

dd completed properly.

Then I shut down and replaced the Puppeee stick with the 1G stick, and pressed the escape key while booting up the computer. This brought up a boot choice window with the 1G pendrive recognized. I clicked on it, and CorePlus booted up. Hooray! This is the first time that a dd install of an iso has worked for me. Very satisying.

I ran through all the buttons on the wbar, just looking at everything and clicking on all the options to see what they were. The only action I took was to test the connection to my local wlan, which worked immediately, returning all expected stats. Very impressive.

I must also say that all the other stats views, like system stats, were equally impressive. It' s such a pleasure when everything on a system works simply and transparently. TCL is beautiful!

Now, just a few preliminary questions:

- The TCL boot didn't put any files onto my hard disk, did it? (I figure it didn't, but I'm the nervous type.)

- Is any sort of minimal web browser included in CorePlus-5.1?

- Should I stay with this 1G pendrive installation for a while until I get the hang of things, before re-installing to a larger drive? Any disadvantage to doing this? If I do stay with it for now, how do I set up a TCE directory?

- The boot screen gives me a lot of choices. Anything there I should try out?

- If I want to stay with the default boot choices, how do I configure the boot file(s) to go right into the desktop without giving me the boot choice screens?

Okay, that's plenty of questions for now.

This is all very exciting. I've waited a long time to get TCL running on my netbook, and I feel like Xmas has just arrived <grin>.

Cheers to all!

Mike
Title: Re: Setting up a pendrive for installation of TCL with core2usb
Post by: gerald_clark on December 22, 2013, 12:32:16 PM
CorePlus is not a live CD for general use.
It is designed to be an installer.
You use it to install Core on a writable hard drive or flash drive.
Core needs a writable filesystem to store installed applications, user settings, and the backup.
The CD image you wrote to the flash drive still thinks it is a CD. It contains a read-only ISO9660 filesystem.
Title: Re: Setting up a pendrive for installation of TCL with core2usb
Post by: Mike7 on December 24, 2013, 08:36:21 AM
Hi, Gerald.

Quote
CorePlus is not a live CD for general use. It is designed to be an installer.
You use it to install Core on a writable hard drive or flash drive. Core needs a writable filesystem to store installed applications, user settings, and the backup. The CD image you wrote to the flash drive still thinks it is a CD. It contains a read-only ISO9660 filesystem.

Okay, I think I undertsand. I'll go ahead and try to install it to another, larger pendrive before doing anything else.

Cheers, and thanks!

Mike