WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: (SOLVED) archiving and restore w/ syslinux (extlinux)  (Read 4895 times)

Offline patrick013

  • Newbie
  • *
  • Posts: 11
(SOLVED) archiving and restore w/ syslinux (extlinux)
« on: June 05, 2012, 02:28:20 PM »
Hi,

I have a habit of taking monthly backups with fsarchiver.   Can restore
these to any flash drive with a few grub legacy commands also.

With Tiny Core installed to a flash drive, I see it uses syslinux and
extlinux.conf.     From an outside drive, what would the commands
look like to put syslinux in the MBR to boot the flash drive from the
restored Tiny Core archive, which is merely restored as is to the
flash drive ?     I'm thinking if I try to switch this to grub legacy I'll
lose persistence at least, and cause a lock-up at worst.   I have /home
nicely set for persistence.

Any advice ?     Simple as "syslinux /boot /dev/sdb"   from terminal ?
Some older documentation I found has contradictory examples for
different approaches.

THX.

patrick
« Last Edit: June 09, 2012, 10:02:23 AM by patrick013 »

Offline Guy

  • Hero Member
  • *****
  • Posts: 1089
Re: archiving and restore w/ syslinux (extlinux)
« Reply #1 on: June 06, 2012, 01:01:23 AM »
It is not completely clear what you are asking. You may want to reword the question.

My best guess is that you backed up your entire Tinycore installation to a flash drive, and you want to boot it from another bootloader.

If you use Grub legacy on the other drive, and syslinux/extlinux on the usb drive, you could use

title   Flash Drive
root   (hd1,0)
chainloader   +1

in Grub legacy

Change root (hd1,0) to the correct drive.

The problem with this method, is that it may be (hd1,0) in one usb port and (hd2,0) in another. So you may want to use UUID.

You can't boot operating systems on usb drives in many older computers.

I suggest also looking into Grub4Dos. It has more functions.


There is an easier way. Set the computer bios so it boots from the usb drive before the hard drive. Do you know how to do this?


Is this what you are trying to do? If not make the question clearer.
« Last Edit: June 06, 2012, 01:20:56 AM by Guy »
Many people see what is. Some people see what can be, and make a difference.

Offline patrick013

  • Newbie
  • *
  • Posts: 11
Re: archiving and restore w/ syslinux (extlinux)
« Reply #2 on: June 07, 2012, 01:35:58 PM »
Is this what you are trying to do? If not make the question clearer.

Thanks for the response.

I've backed up TinyCore and restored it to a flashdrive (sdc).   I've tried this
command per the SYSLINUX Wiki -

dd bs=440 count=1 conv=notrunc if=mbr.bin of=/dev/sdc

The command was accepted and copy was confirmed.

sdc is the new flash drive to be booted from.

Well it says the operating system is missing.   So my
dd command to put SYSLINUX in the MBR didn't work.

I need to be able to put SYSLINUX in the MBR to boot the
flash drive.   Copying or restoring the program to the flash
drive shouldn't be a problem.

That's the question.   Sorry if not clear before.

thx

patrick

Offline Rich

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4248
Re: archiving and restore w/ syslinux (extlinux)
« Reply #3 on: June 07, 2012, 04:54:07 PM »
Hi patrick013
The missing operating system message is probably because you didn't copy bzImage to /mnt/sdc/boot. You should
also copy tinycore.gz over there.

Offline patrick013

  • Newbie
  • *
  • Posts: 11
Re: archiving and restore w/ syslinux (extlinux)
« Reply #4 on: June 07, 2012, 05:08:20 PM »
Hi patrick013
The missing operating system message is probably because you didn't copy bzImage to /mnt/sdc/boot. You should
also copy tinycore.gz over there.

Hi,

Right now /boot contains vmlinux, core.gz and the extlinux
directory.    Same as on the source.     Any other possibilities ?

THX.

Offline Rich

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4248
Re: archiving and restore w/ syslinux (extlinux)
« Reply #5 on: June 07, 2012, 05:13:05 PM »
Hi patrick013
Maybe it would be easier if you use the  syslinux.tcz  extension.

Offline patrick013

  • Newbie
  • *
  • Posts: 11
Re: archiving and restore w/ syslinux (extlinux)
« Reply #6 on: June 07, 2012, 05:17:22 PM »
Hi patrick013
Maybe it would be easier if you use the  syslinux.tcz  extension.

OK,  thought I'd teach myself syslinux on here.   If not I see
some grub examples on the wiki.   I'll let you know if the
syslinux.tcz is a better match and starts to work then.

THX.

Offline patrick013

  • Newbie
  • *
  • Posts: 11
Re: archiving and restore w/ syslinux (extlinux)
« Reply #7 on: June 07, 2012, 09:02:07 PM »
@Rich

No luck with the syslinux.tcz mbr.bin either.   Grub also says
it's missing a file, but the file is right there in /boot.

Oh well, just leave it as-is for awhile.

THX.

Offline Rich

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4248
Re: archiving and restore w/ syslinux (extlinux)
« Reply #8 on: June 07, 2012, 09:53:53 PM »
Hi patrick013
Quote
it's missing a file, but the file is right there in /boot.
Maybe it's looking for the file in the root directory? Did you follow the directions in the Info tab in AppBrowser?

Offline Guy

  • Hero Member
  • *****
  • Posts: 1089
Re: archiving and restore w/ syslinux (extlinux)
« Reply #9 on: June 08, 2012, 05:07:23 PM »
The easiest way would be to install Tinycore on the flash drive. That way it will boot.

Then copy and paste any files you want to back up, to the flash drive.

You can install Syslinux or Extlinux or Grub4Dos manually, but it is more complicated.
Many people see what is. Some people see what can be, and make a difference.

Offline patrick013

  • Newbie
  • *
  • Posts: 11
Re: archiving and restore w/ syslinux (extlinux)
« Reply #10 on: June 08, 2012, 05:25:26 PM »
The easiest way would be to install Tinycore on the flash drive. That way it will boot.

Then copy and paste any files you want to back up, to the flash drive.

You can install Syslinux or Extlinux or Grub4Dos manually, but it is more complicated.

I'm still contemplating this.   I thought I could copy files to the flash then install
mbr.bin with dd, well no way.    Tried installing grub legacy, it reads vmlinux, but
won't read core.gz, it appears to me.   Probably take a dd img of the thing then
in case I want to install it somewhere else then.   That from the original install
started from the iso, which is working fine.   Still contemplating what the problem
might be.   First time for me using syslinux(extlinux) so par for the course then.

thanks for the response.

patrick

Offline Rich

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4248
Re: archiving and restore w/ syslinux (extlinux)
« Reply #11 on: June 08, 2012, 06:38:15 PM »
Hi patrick013
I'm inclined to agree with the advice offered by Guy. If you don't want to do it that way, then first decide on a
filesystem, DOS or Linux based, and select the correct bootloader. From the Info file for syslinux.tcz:
Quote
                bootloaders for MS-DOS FAT filesystems (SYSLINUX),
                network booting (PXELINUX),
                bootable "El Torito" CD-ROMs (ISOLINUX), and
                Linux ext2/ext3/ext4 or btrfs filesystems (EXTLINUX).
If you decide on a Linux filesystem, the info file states:
Quote
                Howto:
                $ sudo mkdir -p /mnt/sda1/boot/extlinux
                $ sudo extlinux -i /mnt/sda1/boot/extlinux
                copy and rename config from tinycore iso...
                $ sudo cp /path-to-file/isolinux.cfg /mnt/sda1/boot/extlinux/extlinux.conf
If you choose to use a DOS based filesystem, visit the  syslinux Wiki  for more information:
http://www.syslinux.org/wiki/index.php/SYSLINUX

Offline patrick013

  • Newbie
  • *
  • Posts: 11
Re: archiving and restore w/ syslinux (extlinux)
« Reply #12 on: June 08, 2012, 07:57:38 PM »
Hi patrick013
I'm inclined to agree with the advice offered by Guy. If you don't want to do it that way, then first decide on a
filesystem, DOS or Linux based, and select the correct bootloader. From the Info file for syslinux.tcz:
Quote
                bootloaders for MS-DOS FAT filesystems (SYSLINUX),
                network booting (PXELINUX),
                bootable "El Torito" CD-ROMs (ISOLINUX), and
                Linux ext2/ext3/ext4 or btrfs filesystems (EXTLINUX).
If you decide on a Linux filesystem, the info file states:
Quote
                Howto:
                $ sudo mkdir -p /mnt/sda1/boot/extlinux
                $ sudo extlinux -i /mnt/sda1/boot/extlinux
                copy and rename config from tinycore iso...
                $ sudo cp /path-to-file/isolinux.cfg /mnt/sda1/boot/extlinux/extlinux.conf
If you choose to use a DOS based filesystem, visit the  syslinux Wiki  for more information:
http://www.syslinux.org/wiki/index.php/SYSLINUX

Hi also,

The only thing that's confusing using ext3 exclusively is why when
the filesystem is identically restored on an additional flashdrive,
that partition has the same UUID, label, format, and every other
parameter there is, why that darned mbr.bin dd'd to the first 440
bytes of the flash drive won't allow that drive to boot successfully.
Let me read the info on the AppsBrowser tomorrow and perhaps
some idea there will click up.   

It syslinux(extlinux) which is already configured must be looking from
the MBR to sda1, instead of to sdb1 or wherever the flash is installed.
Happens with grub if I don't change the root to hd0,0 in menu.lst on
the flash.  Then it boots infallibly when I restore the OS to a flash.
The flash is hd0,0 even tho it isn't sda1.   Don't know how to fix that
with syslinux(extlinux).   I suspect that's the only problem left

regards,

patrick
   





Offline patrick013

  • Newbie
  • *
  • Posts: 11
Re: archiving and restore w/ syslinux (extlinux)
« Reply #13 on: June 09, 2012, 10:01:46 AM »
Well I can mark this solved finally.

Three steps:

1) restore TC to flash drive sdd1 from fsarchiver archive

2)  run sudo dd bs=440 count=1 conv=notrunc if=mbr.bin of=/dev/sdd

3) run sudo extlinux -i /mnt/sdd1/boot/extlinux


Booted right up and is running 100%.   

Offline genec

  • Full Member
  • ***
  • Posts: 240
Re: archiving and restore w/ syslinux (extlinux)
« Reply #14 on: June 19, 2012, 07:09:30 PM »
Well it says the operating system is missing.   So my dd command to put SYSLINUX in the MBR didn't work.
Partition active/boot flag.  Refer to mbr/mbr.S