WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: noautologin remaster script  (Read 3344 times)

Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
noautologin remaster script
« on: September 03, 2009, 05:24:50 PM »
Set BOOTDIR path and run after setting password "passwd".  Requires "advcomp.tcz/e"
Script for tc_2.3    

edits /boot/tinycore.gz  (assumes iso is already unpacked)

edit:  changed to more reliable test

Code: [Select]
#!/bin/ash

### Define directories##
###First set password with "passwd"
### Add "etc/passwd" "etc/shadow" to /opt/.filetool.lst
## requires "advcomp.tcz"

#### SET PATH to boot directory
BOOTDIR=""

#BOOTDIR="/mnt/hda3/tinycore2/boot"


if [ -z $BOOTDIR ]; then
        echo "set BOOTDIR"  
        exit 2
fi

sudo mkdir /tmp/extract
WORKDIR="/tmp/extract"

## Make backup, extract tinycore.gz
cd $WORKDIR
zcat $BOOTDIR/tinycore.gz | sudo cpio -i -H newc -d
sudo mv $BOOTDIR/tinycore.gz $BOOTDIR/tinycore.gz.bak


## edit
echo "working..................."
sudo sed -i   's/--autologin root//'  etc/inittab

### Repack ####
find | sudo cpio -o -H newc | gzip -2 > ../tinycore.gz
 sudo advdef -z4 ../tinycore.gz
sudo mv /tmp/tinycore.gz $BOOTDIR
exit 0
« Last Edit: October 03, 2009, 04:53:33 PM by jpeters »

Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
Re: noautologin remaster script
« Reply #1 on: September 13, 2009, 05:03:37 PM »
added "working..........." so it doesn't look like it's hanging up.
« Last Edit: October 04, 2009, 01:29:00 AM by jpeters »

Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
Re: noautologin remaster script
« Reply #2 on: October 04, 2009, 01:28:01 AM »
Fixed typo "newc" instead of "newd" when unpacking. Strange it worked anyway.