Sign in to follow this  
dyce

How to install to a single disk? (bootloader+data partition)

Recommended Posts

http://cyanlabs.net/Thread-Installing-S ... SB-or-ESXi

I currently found this, but it is DSM 5.0 and a prepared DD image.. therefore I cannot run 5.2.

 

I took a look in virtualbox what his image looks like in gparted

lOJoSLU.png?1

Why would I want this?

I have a dedicated kimsufi server. It has a linux rescue system and you can install Windows even though you cannot deploy it through the web interface for managing the server. Its an atom so it cannot run virtualization efficiently. It is also single disk. See: https://joodle.nl/install-windows-on-a-kimsufi-server/

 

but it involves dd'ing an image, similar to this.

 

Any thoughts on how to do this? or how the image was created? its around 600mb so its much more than just the bootloader.

Share this post


Link to post
Share on other sites

Further analysis tells me that sda1 and sda2 are the default partitions that synology creates after installing. any free space can then be added. i assume the nanoboot/xpenoboot bootloader is directly on the partition somehow.

Share this post


Link to post
Share on other sites

I was trying to do the same thing. Person that made it said he does not remember how he did it. It was on a trial and error basis and he did not write down what worked.

Share this post


Link to post
Share on other sites

It does look like he has got boot loader as well as dsm installation on same partition. later on you can just add sdb as a regular hard drive.

Share this post


Link to post
Share on other sites

I got it!

I was able to get to to install on a VM, with only one disk. I matched the hard drive specs of a kimsufi dedicated server and was able to dd the image to the server and it booted up xpenology! (you don't have access to the screen, but everything worked out)

 

[spoiler=]Ok, I have tried, attempted, and re-attempted to get the grub boot loader to function via the previous post (Xpenology with GRUB2 boot loader) - and have failed. So, I went about this in another direction...extlinux/syslinux boot loader...and not only that, but I have installed the RS3411RPxs DSM which supports 10 drives.

Bonus: I have removed the boot drive from the original installed hardware and booted it on three other "dissimilar" pieces of hardware from server systems to standard desktops (which you must do before installing any additional drives after original install).

So, here is my tutorial for this...



Below I have attached all the files I created, modified, and used for this post except the dsm file, which can be downloaded from the Synology website here: synology_bromolow_rs3411rpxs.pat

 

 

 

Open and modify the "extlinux.conf" AND "syslinux.conf" to match your system settings, mainly partition layout on a "per-step" basis.

ie, first run, it would be (hd0,1) but on your second run it would be (hd0,3) or (hd0,4). This is important on your configuration files or the system "may" not boot.

The reason I have both config files is because when extlinux installs itself, I also use some syslinux files, so it may use the ext config file or it may use the sys config file. It's not that hard to have both and modify both, but if you only want one file then the easiest way to find out is with the "sn=" field. Just make one show "sn=extlinux" and the other show "sn=syslinux" and when you boot, check the serial number and that tells all.

Well, enjoy the rest of the tutorial. I will have another for the DS3612xs similar, if not identical to this one. I'm currently testing raid cards with it, other than that it works just like this one does.



1.) Boot to Ubuntu 10.04 Live

2.) Create 256MB Primary partition with ID=83 (Linux) and make it bootable.

a.) Open a terminal, type "sudo su" to become root, then type "fdisk -l" to list your disk. Then type "fdisk /dev/???" (??? is your disk).

Once in fdisk, type "n" for new partition, "p" for primary, "1" for first partition, "+256M" for 256mb partition size - yes you need the

+ in front. Then press "a", and if it prompts for which partition, press "1" for the first. Now press "w" to write and exit info to disk.

3.) Now format the filesystem and make it useable. **occasionally it will not show the new partition, so run the command: "partprobe" first, then continue...

a.) mkfs -t ext2 /dev/???# (where ??? is your disk, and # is your partition number)

4.) Install extlinux to the drive.

a.) mount /dev/???# /mnt

b.) extlinux -i /mnt

5.) Copy zImage to /mnt

5.5.) Install the syslinux/extlinux mbr code to the disk mbr (a previously missed step):

a.) Use the supplied mbr.bin file from my zip archive, OR "find" it on your system with this command, it will show you EXACTLY where it is:

find / mbr.bin | grep mbr.bin

b.) dd if=/[path to mbr.bin]/mbr.bin of=/dev/???

6.) Create extlinux.conf to boot with ***** NOTE: STEP 6a-c IS NO LONGER NEEDED IF YOU USE MY SUPPLIED FILES *****

a.) nano /mnt/extlinux.conf

b.) Make the contents of the file as follows:


PROMPT 0

TIMEOUT 30

LABEL RS3411RPxs

MENU DEFAULT

ROOT (hd0,1)

KERNEL /zImage

APPEND ihd_num=0 netif_num=4 syno_hw_version=RS3411RPxs sn=B3J4N01003 vid=0x0EA0 pid=0x2168 loglevel=0 vga=0x305


c.) Now copy the file to syslinux.conf (cp extlinux.conf syslinux.conf)

7.) Now reboot and boot from the HDD.

8.) Install via web interface or diskstation software.

9.) DO create the synology raid.

10.) Select the dsm for RS3411RPxs version 4528

11.) When it finishes, and reboots, boot it into Ubuntu 10.04 Live again.

12.) Create 100mb partition right after first two...

a.) Open a terminal, type "sudo su" to become root, then type "fdisk -l" to list your disk. Then type "fdisk /dev/???" (??? is your disk).

Once in fdisk, type "n" for new partition, "p" for primary, "4" for 4thpartition, "+100M" for 100mb partition size - yes you need the

+ in front. Then press "a", and if it prompts for which partition, press "4" for the 4th. Now press "w" to write and exit info to disk.

13.) Repeat steps 3 => 7, but on step 6b, make it show (hd0,4) whichever is your "ID=83 Linux" partition (found with fdisk -l). Mine shows /dev/sda4

so I would use (hd0,4).

14.) Now after it boots, you will need to reboot and boot to Ubuntu 10.04 live again AFTER verifying the Synology raid was created and fully functional on the remainder of the disk.

15.) After verifying Synology raid, reboot and boot into Ubuntu 10.04 live (last time).

16.) Repeat step 12 => 13, but on step 6b, make it show (hd0,3) OR (hd0,4) whichever is your "ID=83 Linux" partition (found with fdisk -l). Mine shows /dev/sda4

so I would use (hd0,4).



Now you have a fully functional RS3411RPxs running DSM 5.0-4528

I have successfully moved this boot drive into other dissimilar hardware from server hardware to standard desktop computers. I do not run any hardware raid on anything (not yet tested) as I believe it would mess with the boot loader and drive mappings, but again - not tested. I have installed multiple disks after and initialized them just fine, and the system still boots. You MUST make sure that this drive (the one we installed on) is always on the first SATA port or first IDE port (if going old school). I have even had it boot via USB from an enclosure, but it does not keep the configuration.

 

source= http://cyanlabs.net/Thread-Xpenology-RS ... t=syslinux

 

I roughly followed that. I don't think all the steps are necessary.

 

Here is roughly how i remember getting it working. He wanted to repeat the steps but i don't know how necessary that is. Honestly i'm not much of an expert on bootloaders.

0. I am not sure if step 5 is needed, or if my instructions will work, i basically just brute forced so hopefully it also works for you.

1. Use xpenology iso to install synology, and upload the PAT and create a login, but do not create the data volume partition.

2. Create a 100mb partition in after the swap partition synology made, ext2 using gparted through a live ubuntu

3. now go back into synology create the volume.

4. after the volume is created, go back to ubuntu live and open gparted, synology should have some empty where you created the ext2 partition. now create the same ext2.

5. apt-get install extlinux, mount that partition (should be /dev/sda4) using mnt /dev/sda4 /mnt

6. use command find / -name *menu.c32 and copy that to /mnt (should be in syslinux/extlinux folder)

7. setup extlinux/syslinux.conf

##YOU CAN USE vesamenu.c32 IF YOU CHOOSE.
DEFAULT menu.c32
PROMPT 0
TIMEOUT 3

##MAKE SURE YOU CHANGE ROOT (hd0,4) TO WHAT YOU NEED.

LABEL RS3411RPxs
MENU DEFAULT
ROOT (hd0,4)
KERNEL /zImage
APPEND ihd_num=0 netif_num=4 syno_hw_version=RS3411RPxs sn=B3J4N01003 vid=0x0EA0 pid=0x2168 loglevel=0 vga=0x305

##MAKE SURE YOU CHANGE ROOT (hd0,4) TO WHAT YOU NEED.

LABEL RS3411RPxsUPGRADE
ROOT (hd0,4)
KERNEL /zImage
APPEND ihd_num=0 netif_num=4 syno_hw_version=RS3411RPxs sn=B3J4N01003 vid=0x0EA0 pid=0x2168 loglevel=0 vga=0x305 upgrade=5.0-4528

be sure to change hw_version to the synology you are trying to match (you can see in the xpenoboot .conf files its configuration).

8. copy zImage from the 5.2 xpenoboot iso to /mnt

9. mark the partition as bootable in gparted.

 

this should let it boot without an additional disk. i was able to dd the image to a dedicated server.

 

1. get the image off the VM into your PC

on your pc run: nc -l 12345 | dd of=synologydrive.img.gz

use ubuntu live run this command:

dd if=/dev/sda | gzip -1 | nc yourPCip 12345

2. Upload the image online

 

3. Boot into netrecovery and dd the image

wget -O- 'url' | gunzip | dd of=/dev/sda

Share this post


Link to post
Share on other sites
Sign in to follow this