Tiny Core Base > TCB Talk

How to setup partitions and exit?

(1/2) > >>

Eddiie:
Hello,
I want to use TC to simply run from a USB stick and erase any partitions that exist on a connected hard disk (fdisk -l shows it as /dev/sdb, make 2 new Linux partitions and exit (or loop indefinitely).

Is this possible with TC?     My searches have found "almost" answers but it seems the OP wants to do more than simply delete any existing partitions and make some new one's.

Appreciate any help!

Rich:
Hi Eddiie
It sounds like you want to automatically repartition the drive upon boot up and then wind up at a command line (or GUI) to perform
other actions. You already installed Tinycore to a USB stick, right? Open your  /opt/bootlocal.sh  file and add the following:

--- Code: ---fdisk /dev/sda <<EOF
commands
EOF
--- End code ---
Replace  commands  with the actual keystrokes you would use when running  fdisk, for example:

--- Code: ---fdisk /dev/sda <<EOF
p
n
p
1
 ---~ SNIP ~---
p
w
EOF
--- End code ---

Eddiie:
Thank you!   Very cool.

Actually, I am going to use dd to wipe -

dd if=/dev/urandom /dev/sda  bs=512 count=1 conv=notrunc

and fdisk to create -

fdisk /dev/sda <<EOF
u
n
p
1
2
1000
n
p
2
1000
w
EOF
fdisk -l


Now to finger out how to make this persist on to the Flash drive and create a new ISO from it.

Rich:
Hi Eddiie

--- Quote from: Eddiie on August 15, 2019, 09:01:05 PM --- ... Now to finger out how to make this persist on to the Flash drive and create a new ISO from it.
--- End quote ---
You need to run a backup. If you're using a GUI, clicking the  Exit  icon then  OK  should run a backup. From the command line:

--- Code: ---filetool.sh -b
--- End code ---

I would highly recommend you take an hour to read this fine book:
http://tinycorelinux.net/corebook.pdf

Eddiie:
I got it working.  So cool.  Reading through wiki and FAQs etc.

To save the settings I wound up creating a EXT2 partition and redirected opt= to that location in boot file I think it was...

I used the core-plus.iso  to install on to a removable media.   Using 64bit.

Is there anything I should post here to help others?

Thank you for the guidance.

Navigation

[0] Message Index

[#] Next page

Go to full version