WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Skip waitusb?  (Read 12745 times)

Offline whitelines2

  • Newbie
  • *
  • Posts: 15
Skip waitusb?
« on: July 02, 2011, 02:39:44 PM »
hey,

it seems its not possible to skip the waitusb=5 boot option. If i create a usb without mention of waitusb=5, i have to wait 5 seconds. If i change it to waitusb=1, i still have to wait 5 seconds.

Is there not a way to just skip the wait? Booting would be almost instant without it... Thanks.

Offline Guy

  • Hero Member
  • *****
  • Posts: 1089
Re: Skip waitusb?
« Reply #1 on: July 02, 2011, 02:50:32 PM »
It depends on the computer and usb drive.

You can leave out waitusb and see what happens.

With many computers and usb drives, it will not work.

I have a computer which pauses longer when booting from a usb drive than when booting from a hard drive.
Many people see what is. Some people see what can be, and make a difference.

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Re: Skip waitusb?
« Reply #2 on: July 02, 2011, 07:09:09 PM »
@whitelines2: If you have a set of extensions on your USB device (e.g. in a '/tce' directory structure) you need to ensure that the device has been recognised by the time TC (or MC) gets around to scanning all devices for such a directory. Even though you can provide some guidance with the 'tce=...' boot code to where the systems should expect to find the 'tce' directory, if the device is not yet ready the 'tce' directory won't be identified (and therefore not used). This should explain why one needs the 'waitusb=...' boot code.

To minimize the time spent with waiting the TC / MC installation script creates a boot code like waitusb=N:UUID="xxx-yyy" The "xxx-yyy" stands for the UUID of the device which uniquely identifies it (unlike a fixed name like 'sda' which would depend on the system configuration etc.). AFAIK the default is N=5, but I'm using a higher value (e.g. 15) to be sure that even my slowest hardware will be able to be recognised. Using a higher value is no disadvantage as the wait time will last only as long as what will be required to find the uniquely specified device.

If you OTOH would boot from a USB stick, but have the 'tce' directory on a (non-USB) hard disk the 'waitusb=...' boot code won't be needed (but the 'tce=...' boot code would still be a really good idea). I for one can not imagine why one would use such a "split setup", as putting the boot loader, kernel and initrd also on the hard disk would be the more obvious solution.

Offline whitelines2

  • Newbie
  • *
  • Posts: 15
Re: Skip waitusb?
« Reply #3 on: July 03, 2011, 01:28:26 AM »
Thanks for informative post. I don't need any extensions i just want to run a dd command in a startup script automatically (so need some kind of persistence in /etc/init.d...

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11630
Re: Skip waitusb?
« Reply #4 on: July 03, 2011, 02:20:02 AM »
Hi whitelines2

Sounds like if you add your commands to  /opt/bootlocal.sh  you'll get what you are looking for.


Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Re: Skip waitusb?
« Reply #5 on: July 03, 2011, 02:58:06 AM »
I don't need any extensions i just want to run a dd command in a startup script automatically (so need some kind of persistence in /etc/init.d...
Whether you put the 'dd' command in '/etc/init.d...' or in '/opt/bootlocal.sh' the "normal" case would be to use backup (via 'mydata.tgz') to gain persistence (which would need to be somewhere on the USB stick and again requiring the 'waitusb=...' boot code to work properly).

To avoid this dependency on the recogition of the USB stick in a timely manner during the TC / MC boot process you'll have to use remastering of the initrd. This way your 'dd' command is part of what the boot loader reads into memory and the fact that the running system learn too late about the existance of the USB stick is not a problem anymore.

Offline whitelines2

  • Newbie
  • *
  • Posts: 15
Re: Skip waitusb?
« Reply #6 on: July 04, 2011, 09:18:58 AM »
Hi,

I decided to just manually install it on the usb stick. I used FlashBoot to install syslinux on it, then i just made my own syslinux.cfg. Please have a look:

http://pastebin.com/6rYXZj7n

Now there is no wait time at all. Is there anything else i need to add to the config file or to the usb stick to get the persistence in etc/init or /opt/bootlocal.sh? I just realized i also need to install bash...

At the moment my usb stick has no tce directory, i guess that is a problem!
« Last Edit: July 04, 2011, 09:31:28 AM by whitelines2 »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14817
Re: Skip waitusb?
« Reply #7 on: July 04, 2011, 09:38:29 AM »
I used FlashBoot to install syslinux on it, then i just made my own syslinux.cfg. Please have a look:
..not sure you need "noicons"

Quote
Is there anything else i need to add to the config file or to the usb stick to get the persistence in etc/init or /opt/bootlocal.sh?
you need to add etc/init to /opt/.filetool.lst and then "filetool.sh -b" will make a backup.

Quote
At the moment my usb stick has no tce directory, i guess that is a problem!
I don't recall if "ab" makes one automatically, but otherwise you can create your own in the root directory and it will be found automatically

Offline whitelines2

  • Newbie
  • *
  • Posts: 15
Re: Skip waitusb?
« Reply #8 on: July 04, 2011, 09:56:04 AM »
Thanks,

very fast replies in this forum :) So i don't actually need to append any other boot options in the config file?

I see some such as restore=, opt= and safebackup.

I just checked and inside dir opt/ there is no file called filetool.lst. Something i'm missing here... i also tried making a file in the home dir and it wasn't there after restart.
« Last Edit: July 04, 2011, 10:09:24 AM by whitelines2 »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14817
Re: Skip waitusb?
« Reply #9 on: July 04, 2011, 10:19:38 AM »
I just checked and inside dir opt/ there is no file called filetool.lst. Something i'm missing here... i also tried making a file in the home dir and it wasn't there after restart.

the file is hidden by putting a "." in front of it - /opt/.filetool.lst - "ls -a" or similar should show it.

you need to initiate a backup/restore - as mentioned "filetool.sh -b" should do it.

Offline whitelines2

  • Newbie
  • *
  • Posts: 15
Re: Skip waitusb?
« Reply #10 on: July 04, 2011, 11:26:02 AM »
Tried filetool.sh -b, it said invalid device. So i formatted the usb and just used the gui in tinycorelinux to make it. Frugal mode, ext2, the only boot options i chose were tce=sda superuser safebackup.

Then rebooted, was able to backup filetool.sh, restarted and the changes i made were there :) However i tried editing another file, bootlocal.sh, and running bootlocal.sh -b         i get sh not found, so it seems like i can't backup that file in the same way as filetool.sh.

I feel like i am missing part of the picture here.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11630
Re: Skip waitusb?
« Reply #11 on: July 04, 2011, 11:39:45 AM »
Hi whitelines2
filetool.sh is used to backup and restore your mydata.tgz file. /opt/.filetool.lst contains a list of files
and/or directories you wish to back up. If you have a line that says   opt/bootlocal.sh   in your
/opt/.filetool.lst  then it will be included when you run a back up.

Offline whitelines2

  • Newbie
  • *
  • Posts: 15
Re: Skip waitusb?
« Reply #12 on: July 04, 2011, 11:58:35 AM »
Ok i read the persistence for dummies part of the wiki and i think i get it now.

I redid the usb creation tool and this time chose 'opt=sdb1 home=sdb1 tce=sdb1 superuser'. So now i have a permanent home for opt and home, and other changes will automatically get saved into the file in tce if i specify it in filetool.lst.

Booted it up for first time and edited bootlocal.sh with the line

hexdump -C /dev/sda

restarted the computer and viola, it works!!!!

Now last thing i need to work out is how to install bash and have it the default shell on startup. The scrips i need to run will be saved in /.bachrc. Thanks for the help!
« Last Edit: July 04, 2011, 12:05:47 PM by whitelines2 »

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Skip waitusb?
« Reply #13 on: July 04, 2011, 12:09:11 PM »
Having opt and home on a flash drive is not recommended.

If you are going to do this, you need to remove all opt and home entries from .filetool.lst.

Offline whitelines2

  • Newbie
  • *
  • Posts: 15
Re: Skip waitusb?
« Reply #14 on: July 04, 2011, 12:17:15 PM »
Ok.

i'll just add opt and home to filetool.lst instead. I've browsed through the entire wiki, can't find any mention of how to download and install extensions from the cli.