Buffalo NAS-Central Forums

Welcome to the Linkstation Wiki community
It is currently Sat May 27, 2017 5:27 am

All times are UTC+01:00




Post new topic  Reply to topic  [ 26 posts ]  Go to page 1 2 Next
Author Message
PostPosted: Tue May 16, 2017 8:08 pm 
Offline
Newbie

Joined: Wed Jan 06, 2016 10:09 am
Posts: 36
I have created a small linux environment based on busybox. So it is possible to install a light debian with debootstrap or to play around.
There is only ext4 support for now and only for the LS-QVL.

You can boot with an internal hdd or by tftp.

Code:
- kernel 4.10.16-marvell + gpio_key patch
- fancontrol, depending on hdd temp
- ledcontrol, depending on hdd health
- debootstrap, working
- auto dhcp, working on all network adapters
- gpio keys (with actkbd)
- parted, working
- dropear, working (login as root, no password)
- screen working during ssh login
- udev

Update:
- poweroff/restart should work correctly now
- wol g works on mv643xxx



Warning!

Only use the blue download button!
All red, green and black buttons lead to executable files with viruses!


uImage.buffalo
initrd.buffalo


Last edited by MarioLange on Tue May 16, 2017 9:35 pm, edited 3 times in total.

Top
   
PostPosted: Tue May 16, 2017 8:14 pm 
Offline
Moderator

Joined: Mon Apr 26, 2010 10:24 am
Posts: 2644
Thanks

Do you know, how to force boot from TFTP with a running HDD inside the nas


Top
   
PostPosted: Tue May 16, 2017 8:41 pm 
Offline
Newbie

Joined: Wed Jan 06, 2016 10:09 am
Posts: 36
You could quick insert the disk after pressing the function key to force the tftp boot when it blinks red. That works for me.


Top
   
PostPosted: Wed May 17, 2017 7:07 am 
Offline
Moderator

Joined: Mon Apr 26, 2010 10:24 am
Posts: 2644
I have tried this on a LS-WVL

Its booting from tftp and i can use debootstrap.
But i am workin on the ram

Now i need a way to
1. format the drive (im using only one drive without raid)
2. make the linkstation bootable with the new startfiles
3. install a linux with debootstrap

or
It is possible to run OpenMediVault on the Linstation


Top
   
PostPosted: Wed May 17, 2017 10:14 pm 
Offline
Newbie

Joined: Wed Jan 06, 2016 10:09 am
Posts: 36
Hi!

This is no big deal! I will write down some instructions tomorrow. Need to sleep first :p


Top
   
PostPosted: Thu May 18, 2017 8:02 pm 
Offline
Newbie

Joined: Wed Jan 06, 2016 10:09 am
Posts: 36
Hi!

Please read first and understand the commands ;-)

Prepare disk
Code:
parted -s -a optimal /dev/sda mklabel gpt
parted -s -a optimal /dev/sda mkpart boot ext2 2048s 75M
parted -s -a optimal /dev/sda mkpart swap linux-swap 75M 2G
parted -s -a optimal /dev/sda mkpart root ext4 2G 100%
mkfs.ext2 -F -L "boot" /dev/sda1
mkswap /dev/sda2
mkfs.ext4 -F -L "root" /dev/sda3
swapon /dev/sda2



Prepare new root folder
Code:
mkdir -p /new_root/
mount -t ext4 /dev/sda3 /new_root
mkdir -p /new_root/boot
mount -t ext4 /dev/sda1 /new_root/boot


Install base debian
Code:
debootstrap --arch=armel --include=nano,mc,tzdata,locales,openssh-server jessie /new_root



Chroot into fresh debian
Code:
mount --bind /dev /new_root/dev
mount --bind /sys /new_root/sys
mount --bind /proc /new_root/proc

SHELL=/bin/bash HOME=/root chroot /new_root



Tasks to do in chroot
Code:
passwd root
systemctl enable systemd-networkd
systemctl enable ssh



Files to prepare


/etc/apt/sources.list
Code:
deb http://ftp.us.debian.org/debian jessie main contrib non-free
deb http://http.debian.net/debian jessie-backports main contrib non-free



/etc/systemd/network/60-eth0.network
Code:
[Match]
Name=eth0

[Network]
DHCP=yes


/etc/fstab
Code:
/dev/sda1 /boot ext2 defaults            0       0
/dev/sda2 none swap sw                                  0       0
/dev/sda3 /     ext4 defaults,noatime,nodiratime   0   1


/etc/ssh/sshd_config
Code:
PermitRootLogin yes


/etc/flash-kernel/machine
Code:
Buffalo Linkstation LS-QVL


You can change it to your needs, look in the flash-kernel database!


Then do still inside chroot
Code:
apt-get update
apt-get upgrade -y
apt-get -t jessie-backports install flash-kernel linux-image-4.9.0-0.bpo.2-marvell


- there should no error during installation
- check if /boot is populated correctly

You can also enable netconsole if there are problems with booting:

/etc/initramfs-tools/modules
Code:
mv643xx_eth
netconsole netconsole=@192.168.11.151/,6666@192.168.11.1/
mvmdio


Code:
update-initramfs -u


You can read the netconsole log on any other pc, just do this
Code:
ip a add 192.168.11.1/24 dev eth0 
nc -l -u -p 6666 | tee ~/netconsole.log



Exit chroot, unmount all mounts and sync. then ready to restart!


After the first restart
Code:
dpkg-reconfigure tzdata
dpkg-reconfigure locales




I dont use raid or stuff like that! I`am using binded disk pools.

-> disk1-data-partition mounted at /hddpool/pool01
-> disk2-data-partition mounted at /hddpool/pool02
-> disk3-data-partition mounted at /hddpool/pool03
-> disk4-data-partition mounted at /hddpool/pool04

Inside this i have folders like:

-> /hddpool/pool01/suttf1
-> /hddpool/pool02/stuff2
-> /hddpool/pool03/stuff3
-> /hddpool/pool03/stuff4
-> /hddpool/pool03/stuff5
-> /hddpool/pool04/stuff6

All of those folders can be binded to one single shared folder.

Code:
mount --bind /hddpool/pool01/stuff1 /shared/stuff1
mount --bind /hddpool/pool02/stuff2 /shared/stuff2
mount --bind /hddpool/pool03/stuff3 /shared/stuff3
mount --bind /hddpool/pool03/stuff4 /shared/stuff4
mount --bind /hddpool/pool03/stuff5 /shared/stuff5
mount --bind /hddpool/pool04/stuff6 /shared/stuff6


That means you have one shared folder with all other pools bind inside.


Let me know if your base system is up and running, then i can provide some useful systemd scripts for fancontrol etc...


Last edited by MarioLange on Fri May 19, 2017 9:29 pm, edited 7 times in total.

Top
   
PostPosted: Thu May 18, 2017 9:37 pm 
Offline
Moderator

Joined: Mon Apr 26, 2010 10:24 am
Posts: 2644
Thank you!


Top
   
PostPosted: Fri May 19, 2017 8:17 pm 
Offline
Newbie

Joined: Wed Jan 06, 2016 10:09 am
Posts: 36
Here are some kernels with correct device trees.


Warning!

Only use the blue download button!
All red, green and black buttons lead to executable files with viruses!




Buffalo Linkstation LS-QVL
uImage.buffalo

Buffalo Linkstation LS-WVL
uImage.buffalo

Buffalo Linkstation LS-WXL
uImage.buffalo

Buffalo Linkstation LS-VL
uImage.buffalo


Initramfs should work with all Kernels!

Initramfs
initrd.buffalo


Last edited by MarioLange on Fri May 19, 2017 8:19 pm, edited 1 time in total.

Top
   
PostPosted: Fri May 19, 2017 8:18 pm 
Offline
Moderator

Joined: Mon Apr 26, 2010 10:24 am
Posts: 2644
i get an error

Code:
parted -s /dev/sda mkpart root ext4 2G -1
parted: invalid option -- '1'
Usage: parted [-hlmsv] [-a<align>] [DEVICE [COMMAND [PARAMETERS]]...]


this works

Code:
parted -s /dev/sda mkpart root ext4 2G 100%



Error 2
Code:
mount -t ext4 /dev/sda1 /new_root/boot
mount: mounting /dev/sda1 on /new_root/boot failed: No such file or directory


i try

Code:
mount -t ext4 /dev/sda3 /new_root
mkdir -p /new_root/boot
mount -t ext4 /dev/sda1 /new_root/boot



mount -t ext4 /dev/sda1 /new_root/boot
shoulld be ?
mount -t ext2 /dev/sda1 /new_root/boot


Top
   
PostPosted: Fri May 19, 2017 8:33 pm 
Offline
Newbie

Joined: Wed Jan 06, 2016 10:09 am
Posts: 36
oxygen8 wrote:
i get an error

Code:
parted -s /dev/sda mkpart root ext4 2G -1
parted: invalid option -- '1'
Usage: parted [-hlmsv] [-a<align>] [DEVICE [COMMAND [PARAMETERS]]...]


this works

Code:
parted -s /dev/sda mkpart root ext4 2G 100%


Thanx, is fixed. Normally -1 is used in interactive mode ;-)

oxygen8 wrote:
Error 2
Code:
mount -t ext4 /dev/sda1 /new_root/boot
mount: mounting /dev/sda1 on /new_root/boot failed: No such file or directory


Try to to:
Code:
modprobe ext4


I have added ext4 as forced to load in the last iniramfs image 2 posts up!

Keep me up with infos, i have written everything out of my mind, maybe some more problems to solve ;-)

Do you like the ssh interface with all the infos? :p

Code:
root@nasbuf | Linux 4.10.16-marvell | 60°C | 1600MHz | 1500rpm | 192.168.10.28 | 218MB RAM |                      Fri 2017-05-19 21:38


Last edited by MarioLange on Fri May 19, 2017 8:39 pm, edited 1 time in total.

Top
   
PostPosted: Fri May 19, 2017 8:38 pm 
Offline
Moderator

Joined: Mon Apr 26, 2010 10:24 am
Posts: 2644
debootstrapping ...


Top
   
PostPosted: Fri May 19, 2017 8:40 pm 
Offline
Moderator

Joined: Mon Apr 26, 2010 10:24 am
Posts: 2644
Quote:
Do you like the ssh interface with all the infos?


Very nice


Top
   
PostPosted: Fri May 19, 2017 8:52 pm 
Offline
Newbie

Joined: Wed Jan 06, 2016 10:09 am
Posts: 36
oxygen8 wrote:
Quote:
Do you like the ssh interface with all the infos?


Very nice


Please read, you need to mount root first and then create boot folder on the mounted root.
Not like i write first... ;-)

Prepare new root folder
Code:
mkdir -p /new_root/
mount -t ext4 /dev/sda3 /new_root
mkdir -p /new_root/boot
mount -t ext4 /dev/sda1 /new_root/boot


Top
   
PostPosted: Fri May 19, 2017 9:05 pm 
Offline
Moderator

Joined: Mon Apr 26, 2010 10:24 am
Posts: 2644
mount -t ext4 /dev/sda1 /new_root/boot

or

mount -t ext2 /dev/sda1 /new_root/boot


Top
   
PostPosted: Fri May 19, 2017 9:23 pm 
Offline
Moderator

Joined: Mon Apr 26, 2010 10:24 am
Posts: 2644
Error
Code:
apt-get update
...

W: Failed to fetch http:/http.debian.net/debian/dists/jessie-backports/non-free/i18n/Translation-en  Unable to connect to :http:


I have no gateway


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 26 posts ]  Go to page 1 2 Next

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Limited