How To Get Syslinux To Boot OS On Another Partition (Solved)

Post here if you are a new Porteus member and you're looking for some help.
jcsoh
Power user
Power user
Posts: 16
Joined: 28 Dec 2010, 08:41
Location: Malaysia

How To Get Syslinux To Boot OS On Another Partition (Solved)

Post#1 by jcsoh » 28 Dec 2014, 14:08

I installed Porteus 3,1 KDE 32 bit on my laptop's hard disk in /mnt/sda2 using Porteus Installer, which I gather is using syslinux.

Installation went well.
I edit porteus.cfg to add slaxremixv09 also in /mnt/sda2.

I'm not familiar with syslinux as I usually use Grub or Grub4dos.
How do I get syslinux to boot another spare copy of either Porteus or SlaxRemix on /mnt/sda3

In grub I would add a root line

root (hd0,2) since it's the 1st hard disk and sda3 3rd partition
kernel blah blah blah

The spare copy is identical except is on sda3 while the other copy is on sda2.

Be kind I'm a slax refugee and on top of that I'm using Porteus Great Great Great Grandpa Slax Remix V09.

:oops:
Last edited by jcsoh on 29 Dec 2014, 03:26, edited 1 time in total.

tome
Contributor
Contributor
Posts: 675
Joined: 26 Jun 2013, 14:03
Distribution: x64 Openbox
Location: Russia is causing the immense damage to humanity
Contact:

Re: How To Get Syslinux To Boot OS On Another Partition

Post#2 by tome » 28 Dec 2014, 19:10

For example download grub4dos and modify porteus.cfg file, I have this:

Code: Select all

LABEL grub4dos
MENU LABEL Grub4dos 0.4.4
KERNEL /boot/grub.exe
APPEND --config-file=/boot/menu1.lst 
Note: Syslinux cannot access files from partitions other than its own.
and
chain.c32 is a COM32 module for Syslinux. It can chainload MBRs, partition boot sectors, Windows bootloaders (ntldr, setupldr.bin and bootmgr), MS-DOS and PC-DOS io.sys, Freedos kernel.sys, isolinux.bin (only from ISOLINUX), grldr of grub4dos or a bootsector saved to a file. It can also swap BIOS drive numbers or hide partitions.
see:
http://www.syslinux.org/wiki/index.php/ ... /chain.c32
https://wiki.archlinux.org/index.php/Syslinux
You have mind and feelings. Be wise and clever.

jcsoh
Power user
Power user
Posts: 16
Joined: 28 Dec 2010, 08:41
Location: Malaysia

Re: How To Get Syslinux To Boot OS On Another Partition

Post#3 by jcsoh » 28 Dec 2014, 19:50

Thanks.

"Syslinux cannot access files from partitions other than its own."
I had a suspicion is something like this.
Not a big issue as the spare os is mainly to save the trouble of digging for my livecd for any rescue.

Anyway I will try with grub4dos as you suggested. It sound to be the easiest as I am familiar with legacy grub and it's menu.lst.

Actually I started with using legacy grub to install but it keep telling me it can't find the file, so I gave up and use Porteus installer.

Bring back ,memories of when I started with linux and didn't know how to install Slax. I use Wolvix installer to install slax.

Tsk tsk guess I have a bad habit of "stealing" other people installer for unintended purpose.

But hey Slax Remix have some Porteus DNA. :D

Once again. Thanks.

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Re: How To Get Syslinux To Boot OS On Another Partition

Post#4 by fanthom » 28 Dec 2014, 21:55

@jcsoh
you could also copy vmlinuz+initrd.xz to a partition where syslinux is installed and boot from them.
the only downside is that you have to remember to update these files when doing an upgrade.
Please add [Solved] to your thread title if the solution was found.

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Re: How To Get Syslinux To Boot OS On Another Partition

Post#5 by Ed_P » 28 Dec 2014, 23:33

@jcsoh

Should you decide to try the USB stick route this tutorial should help you.

http://www.rmprepusb.com/tutorials/porteus
Ed

User avatar
francois
Contributor
Contributor
Posts: 6434
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

Re: How To Get Syslinux To Boot OS On Another Partition (Sol

Post#6 by francois » 29 Dec 2014, 03:42

Hello jcsoh. Welcome back. :)

grubconfig package for grub legacy:
http://forum.porteus.org/viewtopic.php?f=62&t=946
Prendre son temps, profiter de celui qui passe.

jcsoh
Power user
Power user
Posts: 16
Joined: 28 Dec 2010, 08:41
Location: Malaysia

Re: How To Get Syslinux To Boot OS On Another Partition (Sol

Post#7 by jcsoh » 29 Dec 2014, 04:11

Thanks everyone.

Here is what I did.
(a) The Grub4dos method (Didn't work)
It boot up with find menu1.lst message end in a command prompt.
Grub>

Seem it can't find the menu1.lst,
Maybe I got some of the syntax wrong?

(b) Plop Boot Manager +Grub 0.97 (Worked)

All the while I'm aware that Plop can boot bootable partition, so it was a matter or making the partition bootable.

I just use grub 0.97 (legacy grub) and install as normal to SDA3,
I swear I tried this earlier but it didn't work.
But don't know why, this time it work and Plop can boot up SDA3 and from there I select based on the menu.lst on SDA3.

(c) Com32 module of Syslinux + Grub 0.97(worked)

Porteus menu already have the option to boot up from the 1st hard disk & 1st bootable partition(usually window os)

Since now grub 0.97 made my SDA3 bootable, just edit Porteus,cfg
Copy the boot from 1st hard disk menu

Just amend
APPEND hd0 1
(hd0 = 1st hard disk ,1 = 1st partition)

In my case since is SDA3 = 3rd partition
I use

APPEND hd0 3

Conclusion
I can boot up using:
(a) Plop selecting the 3rd partition (SDA3)
(b) Porteus.cfg Menu Entry to boot from 3rd Partition

Once I boot up in the 3rd partition, I'm presented with Grub menu.lst and make my selection from there.
While this involve a double menu, but for an emegency spare os which will be use less often (touch wood here :D ) it accepatable.

Side Notes

The laptop is Lenovo G50-70 I3 uefi turn off booting in legacy mode. The win 8.1 with Bing died after my tingkering.

Unfortunately with both Slax Remux V09 or even Porteus s3.1 32 bits , booting up :
(a) Screen Brightness OK
Fortunately the default screen brightness is ok (ok in the sense this is what I would have selected or I might reduced the brightness a bit).

(b) Wired Internet Work
Work

[c](c) Track Pad / Track Pad switch off button Work[/b]
Work

(d) Screen Blankout / Switch off button work
Work

All others like wifi, sound, sound volume button, brightness button don't work.
Bluetooth - no idea as I don't have and bluetooth device,

I tried the Ubuntu family of Ubuntu, Kubuntu & Linux Mint. Everything work I think.
I even installed Kubauntu (this is the 1st time I install a full fledge linux distro).
After done I install 1 sole software (I never did anything else at all). I istall I must have file manager of Krusader
using Kubuntu Muon Software Centre
Afterward Krusader did work.
But true enough after rebooting Kubuntu can't start. I got the 1st item of the menu which is memtest.
Fair enough, if I'm familiar with Ubuntu I probably could edit the grub2??? menu.

But thanks but no thanks. I don't want an os even with perfert hardware detection that broke after I download an install the 1st application from their own software centre.

Maybe it's something to do with Krusader but it was in their software centre,

So once again thanks guy you can't imagine how happy I am still to be the the slax , slax Remix & Porteus world.

Especially since Porteus have a life saving (now) Installer.
Previous I wouldn't use it as I alway use grub0.97 manually or now grubconfig.
It had always work.

But now with the uefi laptoop and also a uefi desktop, both with uefi turn off , booting in legacy mode ,window 8 gpt partition deleted, reformat with msdos file partition with the usual linux ext4 partitions , grub 0.97 is failing to install.

So even if I end up still using slaxremixv09 (right now you have to drag my stiff cold dead body to kde4 world)
I will use Porteus installer,

Hey maybe I will like Plasma 5 (KDE 5).

Special thanks to Fanthom.
Just know that, while it may be not what you intended, but your creation of slaxremix v09 is alive out there in the wilderness,,,,,

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Re: How To Get Syslinux To Boot OS On Another Partition (Sol

Post#8 by Ed_P » 29 Dec 2014, 05:30

jcsoh wrote:(a) The Grub4dos method (Didn't work)
It boot up with find menu1.lst message end in a command prompt.
Grub>

Seem it can't find the menu1.lst,
Maybe I got some of the syntax wrong?
The file grub4dos looks for is: menu.lst not menu1.lst. And do you have a menu.lst file, yes?
Ed

jcsoh
Power user
Power user
Posts: 16
Joined: 28 Dec 2010, 08:41
Location: Malaysia

Re: How To Get Syslinux To Boot OS On Another Partition (Sol

Post#9 by jcsoh » 29 Dec 2014, 09:23

menu.lst not menu1.lst.
I thought you purposely change it to menu1.lst instead of menu.lst.
I tried with both, but if it work for you must be my syntax or typing error.
Yes, I have a menu.lst taken from my usual grub installation.

@ Francois.
Yes I saw you link for the grub extra sometime ago.
The "grubconfig" script made it so easy.
I kept the grub install syntax in a text file all this while since my grub boot loader seldom neeb to be install, everytime I want to do it I have to hunt for my text file as I forgot in which folder
I saved it.

Now with grubconfig I just accept the simple install option,
Installing grub now is a piece of cake.

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Re: How To Get Syslinux To Boot OS On Another Partition (Sol

Post#10 by Ed_P » 29 Dec 2014, 16:02

jcsoh wrote:I thought you purposely change it to menu1.lst instead of menu.lst.
I tried with both, but if it work for you must be my syntax or typing error.
Yes, I have a menu.lst taken from my usual grub installation.
I'm not sure the grub menu syntax is the same as that used by grub4dos. They maybe similar but not the same.

FWIW This is my Grub4DOS menu.lst

Code: Select all

# http://sourceforge.net/projects/grub4dos/
# Grub4DOS 0.4.5c 2013-03-03   http://code.google.com/p/grub4dos-chenall/downloads/list

# global options
#
# splashimage=/grub/splash/glogo.xpm.gz
# splashimage=/grub/splash/tux.xpm.gz
  splashimage=/grub/splash/tux.new.xpm
# http://www.schultz-net.dk/grub.html
# ****ground rrggbb   000000=black  ffffff=white  8-f = bright
  foreground 000088
  background cccccc

# color <foreground/background> [hilite-fg/hilite-bg [help test [heading]]] - sans splashimage
# colors:                black       blue       green       cyan       red       magenta   brown    light-gray
#   foreground only: dark-gray light-blue light-green light-cyan light-red light-magenta   yellow   white
color blue/white

# http://www.rmprepusb.com/tutorials/grub4dos#TOC-Single-Stepping
# To step thru msgs prior to menu quickly press the Insert key when booting

timeout 600
default 1
fallback 4

set ISOx=elementaryos.iso

# menu entries

title 0. Windows 7 System Repair Disc - 64-bit\n 187MB\n\ When prompted press Enter to boot disc.
find --set-root /ISOs/repair_disc_windows_7_64_bit.iso
map /ISOs/repair_disc_windows_7_64_bit.iso (hd32)
map --hook
root (hd32)
chainloader (hd32)

title 1. Porteus\n\n Porteus Menu options 
configfile /grub/Porteus.lst

title 2. BartPE\n 744MB\n Takes a moment to initiate.  
find --set-root /ISOs/pebuilder.iso       
map --mem /ISOs/FiraDisk.gz (fd0)         
map --mem /ISOs/pebuilder.iso (0xff)      
map --hook  
root (0xff)                         
chainloader (0xff)/I386/SETUPLDR.BIN 

title 3. Windows
chainloader (hd0)+1

title 4. Reboot
reboot

title 5. Switch menu (Additional GRUB commands)
configfile /grub/EdsLsts/menuXtended.lst

title   \n
root ()

title X. Elementary OS  \n 845MB\n -unstable-amd64.20140810.iso
find --set-root                       /ISOs/%ISOx%
map --heads=0 --sectors-per-track=0   /ISOs/%ISOx% (0xff) 
map --hook
root (0xff)
kernel /casper/vmlinuz           file=/ISOs/%ISOx% iso-scan/filename=/ISOs/%ISO% boot=casper quiet splash --   
initrd /casper/initrd.lz

# Load the MBR
# chainloader (hd0)+1
# Load the bootsector
# chainloader +1
# Load the loader
# chainloader /ntldr or /bootmgr

# end file menu.lst
And yes, most of the stuff I boot is .iso files.

And this is my Porteus.lst for LXQt.

Code: Select all

splashimage=/ISOs/porteus31.bmp 
# splashimage=/ISOs/porteus.xpm.gz 
color white/blue black/light-gray yellow/blue blue/yellow
# ****ground rrggbb   000000=black  ffffff=white  8-f = bright
foreground ffffff
background 000077
        
# Grub4DOS kernel parms - translated from Porteus LXQt 3.1 iso V:\boot\syslinux\porteus.cfg file.

default 0
set ISOx=Porteus-LXQT-v3.1-x86_64.iso

title  |   Porteus-v3.1 64bit       |\n Porteus main menu\n\n\n %ISOx% 
root ()

title  |                            |\n 
root ()

title  | Graphics mode (LXQt)       |\n\n Run Porteus the best way we can. Try to\n autoconfigure graphics card and use the\n maximum allowed resolution.
find --set-root                       /ISOs/%ISOx%
map --heads=0 --sectors-per-track=0   /ISOs/%ISOx% (0xff) 
map --hook
root (0xff)
kernel /boot/syslinux/vmlinuz    from=/ISOs/%ISOx% changes=/porteus3.1/changes/porteussave.dat timezone=US/Eastern extramod=/porteus3.1/Modules 
initrd /boot/syslinux/initrd.xz

title  | Always Fresh               |  \n Normally Porteus saves all changes to the\n /porteus/changes/ directory on the boot media\n (if writable) and restores them next boot.\n Use this option to start a fresh system, changes are not read from or written to any device.
find --set-root                       /ISOs/%ISOx%
map --heads=0 --sectors-per-track=0   /ISOs/%ISOx% (0xff)
map --hook
root (0xff)
kernel /boot/syslinux/vmlinuz    from=/ISOs/%ISOx% nomagic base_only norootcopy timezone=US/Eastern
initrd /boot/syslinux/initrd.xz

title  | Copy To RAM                |\n\n Run Porteus the same as above, but first copy\n all data to RAM to get a huge speed increase.\n (needs >768MB)
find --set-root                       /ISOs/%ISOx%
map --heads=0 --sectors-per-track=0   /ISOs/%ISOx% (0xff) 
map --hook
root (0xff)
kernel /boot/syslinux/vmlinuz    from=/ISOs/%ISOx% copy2ram timezone=US/Eastern
initrd /boot/syslinux/initrd.xz

title  | Text mode                  |\n\n Run Porteus in text mode and start the\n command prompt only
find --set-root                       /ISOs/%ISOx%
map --heads=0 --sectors-per-track=0   /ISOs/%ISOx% (0xff) 
map --hook
root (0xff)
kernel /boot/syslinux/vmlinuz    from=/ISOs/%ISOx% 3 timezone=US/Eastern
initrd /boot/syslinux/initrd.xz

title  | Porteus as PXE server      |\n\n Run Porteus as usual, but also initialize\n a PXE server. This will allow you to boot\n Porteus on other computers over a network.
find --set-root                       /ISOs/%ISOx%
map --heads=0 --sectors-per-track=0   /ISOs/%ISOx% (0xff) 
map --hook
root (0xff)
kernel /boot/syslinux/vmlinuz    from=/ISOs/%ISOx% pxe timezone=US/Eastern
initrd /boot/syslinux/initrd.xz

title  |                            |\n 
root ()

title  | PLoP BootManager           |\n\n Run the plop boot manager. This utility\n provides handy boot-USB options for\n machines with vintage/defective BIOS.
find --set-root                       /ISOs/%ISOx%
map --heads=0 --sectors-per-track=0   /ISOs/%ISOx% (0xff) 
map --hook
root (0xff)
kernel /boot/syslinux/plpbt

title  | Boot from the first hd     |\n\n Don't start Porteus at all, rather run\n the operating system installed on the\n first partition of the hard drive.
COM32 chain.c32
APPEND hd0 1
chainloader (hd0)+1

title  |                            |\n 
root ()

title  | ..return                   |\n\n Exit Porteus menu
configfile (bd)/menu.lst 

title  |----------------------------|\n 
root ()
Ed

Post Reply