LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-27-2010, 12:35 PM   #1
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
USB bootstick, usbimg2disk.sh and OEM recovery partition


Hello

Is it possible to load a USB stick so it works as a Slackware bootstick, a dual boot system and Slackware 13.1 installation medium?

I'm planning to install 13.1 on a netbook (Samsung NP-N150-KA01IN) which comes with Windows 7 installed and probably an OEM recovery partition (I don't have the netbook yet). In this LQ thread, dimm0k asked about keeping the OEM boot system including OEM recovery while being able to dual boot Slackware. samac suggested using a USB stick to control the boot.

During Slackware installation there is a step to create a USB bootstick.

The netbook does not have a CD/DVD drive so I plan to use Eric Hameleers' usbimg2disk.sh (now part of the Slackware 13.1 distribution).

It would be great if all three functions could be combined on single USB stick and it could also carry data files. I would be able to carry a complete "disaster recovery" solution while travelling light.

Only downside to this plan is that losing the USB stick would mean only being able to boot Windows 7

I'm happy to put some work into this but don't know where to look for the architecture of the bootstick and can't reverse engineer it not having created one during installation. Suggestions very welcome.

Best

Charles
 
Old 05-27-2010, 12:59 PM   #2
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
Hey catkin

Well, why not use Plop Bootmanager, the executable, not the install-to-MBR one
I include iin all my live stuff
its like 2kb!

anyway, it can boot hdd, usb,cdroms,usb-cdroms,etc on pc's with or without BIOS support for usb,etc
Heres one I use-
http://multidistro.com/downloads/plpbt

So, it can boot the windows hdd from a usb no issue
it can also, on most, boot the usb its on too

very simple too and its somewhat configurable

so, say you had your windows netbook, a fat32/ext2/ext3 usb
and the usb has maybe the whole slack tree, or DVD iso, etc
just make a syslinux.cfg or grub menu.lst or grub2(did you know grub2 can run from fat32 usb?)
and the syslinux.cfg,menu.lst,etc would have plop and slack and whatever entries also
thats actually how I install slack from a DVD on hdd partition

I put the slack kernel(hugesmp.s) , initrd.img and plop on the usb
with a syslinux.cfg
the slack dvd is on hdd partition
my PC doesn't boot from usb
so, I have a grub2 menu entry for plop too
I boot the usb, then boot slack kernel
make 2 mountpoints
mkdir /source
mkdir /iso
then I mount my hdd partition where the dvd is
mount /dev/sda2 /source
then mount the dvd
mount -o loop /source/slack-dvd.iso /iso

then I enter "setup"
and when it gets to where medium is I say premounted directory
and enter
/iso/slackware

anyway, point is Plop plpbt can boot almost anything

But, maybe there are other solutions too?
EDIT: unconfigured, Plop can only "see" the first 4 hdd partitions
as I said it is somewhat configureable and doesn't need to install anywhere

Last edited by linus72; 05-27-2010 at 01:01 PM.
 
Old 05-27-2010, 01:28 PM   #3
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
Ok

so heres a sample grub2, grub1, and isolinux/syslinux menu entries for Plop plpbt

Grub2(make sue you use "linux16", not "linux"
Code:
menuentry "PLOP" {
	linux16	/boot/plpbt
}
Grub Legacy
Code:
title Plop Bootmanager
root (hdx,x)
kernel /boot/plpbt
isolinux/syslinux.cfg
Code:
label plpbt
menu label Plop Bootmanager
kernel /boot/plpbt
syslinux.cfg with Plop and slack isolinux.cfg(just rename isolinux folder to syslinux, rename isolinux.cfg to syslinux.cfg
assuming everything on usb is in folder named "current"
Code:
default hugesmp.s
prompt 1
timeout 1200
display /current/message.txt
F1 /current/message.txt
F2 /current/f2.txt
label plpbt
menu label Plop Bootmanager
kernel /current/plpbt
label huge.s
  kernel /current/bzImage
  append initrd=/current/initrd.img load_ramdisk=1 prompt_ramdisk=0 rw SLACK_KERNEL=huge.s
label hugesmp.s
  kernel /current/bzImage
  append initrd=/current/initrd.img load_ramdisk=1 prompt_ramdisk=0 rw SLACK_KERNEL=hugesmp.s
label speakup.s
  kernel /current/bzImage
  append initrd=/current/initrd.img load_ramdisk=1 prompt_ramdisk=0 rw SLACK_KERNEL=speakup.s
EDIT: and of course nothing on pc/lappy is touched
or installed to mbr

Last edited by linus72; 05-27-2010 at 01:30 PM.
 
Old 05-27-2010, 01:43 PM   #4
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578

Original Poster
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Thanks linus72

That will take some digesting but Plop sounds powerful. I'll give the thread a while to gather more replies before jumping in.
 
Old 05-27-2010, 01:51 PM   #5
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
I agree, as there may be an easier, simpler way
 
Old 05-30-2010, 09:36 AM   #6
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578

Original Poster
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Some more information about the USB bootstick ...

The script that creates the USB bootstick can be found after installation as /var/log/setup/setup.80.make-bootdisk but it cannot ordinarily be run after installation because it requires syslinux which is part of the installation system but not AFAIK installed.

The USB bootstick has a FAT12 file system. The help text explains what it does ($ROOT_DEVICE is substituted when the bootstick is created):
Code:
By default, this stick boots a root Linux partition on $ROOT_DEVICE when you
hit ENTER.  If you'd like to boot some other partition, use a command like
this on the prompt below:

    mount root=/dev/sda1 ro

Where "/dev/sda1" is the partition you want to boot, and "ro" specifies that
the partition should be initially mounted as read-only.  If you wish to mount
the partition read-write, use "rw" instead.  To set the video console mode,
use the vga= parameter (press F1 to see a table).  You may also add any other
kernel parameters you might need depending on your hardware, and which
drivers are included in your kernel.

Last edited by catkin; 05-30-2010 at 09:37 AM. Reason: poetry
 
Old 05-30-2010, 10:00 AM   #7
sahko
Senior Member
 
Registered: Sep 2008
Distribution: Slackware
Posts: 1,041

Rep: Reputation: Disabled
I always use isohybrid http://syslinux.zytor.com/wiki/index...HARD_DISK_MODE
 
Old 05-30-2010, 10:25 AM   #8
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 232Reputation: 232Reputation: 232
Quote:
The script that creates the USB bootstick can be found after installation as /var/log/setup/setup.80.make-bootdisk but it cannot ordinarily be run after installation because it requires syslinux which is part of the installation system but not AFAIK installed.
If you neeed to run any of these setup scripts it's easiest to just run pkgtool as root and select "Setup - Choose Slackware installation scripts to run again".

Syslinux is installed in a full Slackware install - it's in the 'a' package series in syslinux-3.84-x86_64-2 on Slackware64 13.1. The usb disk creation scripts run fine.
 
1 members found this post helpful.
Old 05-30-2010, 10:51 AM   #9
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,371

Rep: Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750
Quote:
Only downside to this plan is that losing the USB stick would mean only being able to boot Windows 7
I suggest you consider setting up a multiboot arrangement rather than using a USB stick.

I recently installed Slackware on an Acer eMachine eM250 that has no optical drive and came with the OEM recovery partition on the first partition and WindowsXP on the second partition.
My method was:
Prepared a USB boot stick with the usbinstaller on the install DVD.
Upon starting, I hit F12 to get a boot device menu and selected the USB option.
Once I had a root login, I then mounted a backup of an existing Slackware installation on an external USB hard disk. I did 'chroot' to this so that I could use 'ntfsresize' to reduce the size of the
preinstalled NTFS partition containing the WindowsXP partition.
I then rebooted into Windows to complete the NTFS resize and used the Windows disk manager tool to setup additional partitions.
After again rebooting with the USB stick, I conducted an NFS install from the install DVD mounted in my desktop. (I had previously set up NFS on the desktop for use with another laptop.)

I am now multi booting Windows and Slackware (13.0 and 13.1) as well as the OEM recovery partition using LILO installed on the MBR as the boot loader.
 
2 members found this post helpful.
Old 06-01-2010, 02:50 AM   #10
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578

Original Poster
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Quote:
Originally Posted by bgeddy View Post
If you neeed to run any of these setup scripts it's easiest to just run pkgtool as root and select "Setup - Choose Slackware installation scripts to run again".

Syslinux is installed in a full Slackware install - it's in the 'a' package series in syslinux-3.84-x86_64-2 on Slackware64 13.1. The usb disk creation scripts run fine.
Thanks bgeddy that will teach me to do a full installation next time, as recommended.
 
Old 06-01-2010, 02:55 AM   #11
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578

Original Poster
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Quote:
Originally Posted by sahko View Post
Thanks sahko that looks like another option to explore.
 
Old 06-01-2010, 03:19 AM   #12
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578

Original Poster
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Quote:
Originally Posted by allend View Post
I am now multi booting Windows and Slackware (13.0 and 13.1) as well as the OEM recovery partition using LILO installed on the MBR as the boot loader.
Thanks allend It's good to learn you were able to do that and using standard tools is nice. I'll probably:
  1. Use a bootable BootIT New Generation (BING) to resize the RECOVERY and WXP installation partitions (good experiences and familiarity)
  2. Use GRUB rather than LILO (familiarity).
  3. Install fully from a USB stick rather than from a networked file system (so can easily carry disaster recovery tools).
  4. Use usbimg2disk.sh. Still downloading Slackware 13.1 so have not been able to experiment yet.
First set-back last night when tried to make a bootable USB stick with KNOPPIX. Used the ImageWriter technique of
dd bs=4096 if=KNOPPIX_V6.2.1DVD-2010-01-31-EN.iso of=/dev/sdc but neither Samsung N150 nor regular desktop computer would boot it. After booting regular computer from HDD its /var/log/messages had kernel: sdc: unknown partition table but Thunar (Xfce file manager) mounted it OK as iso9660 and was able to browse it ... ?
 
Old 06-01-2010, 03:35 AM   #13
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,371

Rep: Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750
Comments on:
1. Leave that RECOVERY partition alone!
2. I am told it works.
3. That would be just fine. I just did not need to bother with copying the install disk to my usb key or an external USB drive by using this technique.
4. I am a great fan of tools from Alien_Bob.

As for the last, take it up with the KNOPPIX people.

Good luck and have fun :-)
 
1 members found this post helpful.
Old 06-01-2010, 04:57 AM   #14
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578

Original Poster
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Quote:
Originally Posted by allend View Post
1. Leave that RECOVERY partition alone!
Thanks for the warning. Will do.
 
Old 06-30-2010, 09:10 PM   #15
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578

Original Poster
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Update

I went the easy root in the end, leaving the as-supplied partitions untouched, using usbimg2disk.sh to format and populate the USB memory stick and doing a standard Slackware installation -- including installing LILO to the internal HDD and choosing not to make a "Slackware USB boot stick" (it uses FAT12 so the USB stick isn't much use for anything else and the functionality it provides can be provided in other ways).

Plop would probably have been the cleanest, most powerful solution and ISOLINUX worth investigating but I've lost a lot of USB sticks so requiring a USB stick to boot Slackware off HDD was a high risk.
 
  


Reply

Tags
usb



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
usbimg2disk.sh fails on dependencies check zavko Slackware 1 02-11-2010 10:11 AM
How to pass initrd parameter using slack's bootstick? Larry37 Slackware 6 08-05-2009 08:07 PM
ntfs partition on usb disk messed up by gparted needs recovery cristiano.fava Linux - Hardware 8 03-09-2009 10:02 AM
OEM partition and installing hamtavs Linux - Laptop and Netbook 2 04-30-2006 10:58 AM
Partition recovery julien.r Linux - Hardware 2 11-19-2003 08:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:29 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration