Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

I'm in trouble installing Slack-14.2beta to NVMe (950 pro ssd)

124 views
Skip to first unread message

Grant

unread,
Feb 17, 2016, 11:13:41 PM2/17/16
to
Hi All,

Built a shiny new box that has a Samsung 950 Pro 256GB SSD as
it's only hard drive, as other data can go to the NAS box on
localnet.

Well, the slackware64-current installer does not understand
NVMe memory -- the install boot disk can see the device as
/dev/nvme0n1 and can partition the device, but the installer
itself (setup) cannot see the device, even if formatted and
mounted to /mnt before invoking setup.

This is really a show stopper -- makes my new shiny just a
windoze box...

I've dropped an old 160GB hdd into the box so I can copy a
slack installation to the NVMe, but then there's the issue
of how to put in the dual boot I'd like to have. I've seen
a site that uses isolinux to boot to the NVMe, but no mention
of dual booting.

I suppose I can run Slackware in a VM, but that's not so
natural for proper access to hardware. Not the full quid.

Anyone got a clue for me please?

Photos of the hardware, and a write up on whirlpool:

<http://bugsplatter.id.au/misc/skylake.html>
<https://forums.whirlpool.net.au/forum-replies.cfm?t=2499449>

Thanks,
Grant.

Henrik Carlqvist

unread,
Feb 18, 2016, 2:57:59 AM2/18/16
to
On Thu, 18 Feb 2016 15:13:38 +1100, Grant wrote:
> -- the install boot disk can see the device as /dev/nvme0n1 and can
> partition the device, but the installer itself (setup) cannot see the
> device, even if formatted and mounted to /mnt before invoking setup.

The installer (setup) consists of a number of bash scripts. Those scripts
probably have to be updated to also support dev/nvme*. The scripts live
within a compressed file system on the installation CD/DVD so some gzip,
cpio and mkisofs work will be needed to remaster the installation media.

I am no part of the Slackware development team, but maybe a tested and
contributed patch to those installation scripts could make its way into
the official Slackware installation media before next release?

Somewhere I have a Makefile which looks at a source tree for the
Slackware installation file system image file and rebuilds the image file
and the .iso file if any file within the source tree is newer. If you so
wish I can look for that Makefile and post it here.

regards Henrik
--
The address in the header is only to prevent spam. My real address is:
hc351(at)poolhem.se Examples of addresses which go to spammers:
root@localhost postmaster@localhost

Grant

unread,
Feb 18, 2016, 12:47:15 PM2/18/16
to
On Thu, 18 Feb 2016 07:55:01 -0000 (UTC), Henrik Carlqvist <Henrik.C...@deadspam.com> wrote:

>On Thu, 18 Feb 2016 15:13:38 +1100, Grant wrote:
>> -- the install boot disk can see the device as /dev/nvme0n1 and can
>> partition the device, but the installer itself (setup) cannot see the
>> device, even if formatted and mounted to /mnt before invoking setup.
>
>The installer (setup) consists of a number of bash scripts. Those scripts
>probably have to be updated to also support dev/nvme*. The scripts live
>within a compressed file system on the installation CD/DVD so some gzip,
>cpio and mkisofs work will be needed to remaster the installation media.
>
>I am no part of the Slackware development team, but maybe a tested and
>contributed patch to those installation scripts could make its way into
>the official Slackware installation media before next release?
>
>Somewhere I have a Makefile which looks at a source tree for the
>Slackware installation file system image file and rebuilds the image file
>and the .iso file if any file within the source tree is newer. If you so
>wish I can look for that Makefile and post it here.

Please do, I'm not as bright as I used to be ;o) Maybe running the
install scripts in a VM would allow me to inspect the uncompressed
files?

Then I have the dual boot to take care of, at the moment Win10 is a
secure install, not the insecure MBR method -- the windows installer
refused to install to MBR partitioned SSD, I had to delete all the
fdisk prepared MBR style partitions before the Win10 installer would
progress :(

My only win was to restrict Win10 to 200GiB total, leaving room for
Slackware and over provisioning of the SSD by allowing about 10%
unallocated space (256GB SSD is 238GiB).

Thanks,
Grant.
>
>regards Henrik

Henrik Carlqvist

unread,
Feb 19, 2016, 3:22:31 PM2/19/16
to
On Fri, 19 Feb 2016 04:47:10 +1100, Grant wrote:
>>Somewhere I have a Makefile which looks at a source tree for the
>>Slackware installation file system image file and rebuilds the image
>>file and the .iso file if any file within the source tree is newer. If
>>you so wish I can look for that Makefile and post it here.
>
> Please do,

Unfortunately I didn't find my Makefile for Slackware 14.1, this one is
for my custom 13.1. Hope it doesn't differ too much:

-8<------------------------
PACKAGE_DIRS = $(shell find ../slackware64/ \( -type d -o -type l \) \
-exec basename {} \;| \
grep -v slackware64 | grep -v PACKAGES.TXT )
KERNELS = $(shell find kernels/ \( -type d -o -type l \) \
-exec basename {} \;| \
grep -v kernels | sort | xargs echo )
BZIMAGES = $(KERNELS:%=kernels/%/bzImage)

DISTRO_NAME = Slack131
KERNEL_VERSION = 2.6.33.4
KERNEL_COMPRESSION = xz

LINUX_SRC=\
kernel_and_patches/linux-$(KERNEL_VERSION).tar.$(KERNEL_COMPRESSION)
PATCHES = $(wildcard kernel_and_patches/*.patch)

PKG_BUILD_DIR = /var/tmp/pkg_build
KERNEL_BUILD_DIR = /var/tmp/kernel_build/linux-$(KERNEL_VERSION)

.INTERMEDIATE: $(KERNEL_BUILD_DIR) $(PKG_BUILD_DIR)

KERNEL_PATCH_PKG_DIR = slackware64/kernel-upgrades

PREV_PATCH_NR = \
$(shell ((ls $(KERNEL_PATCH_PKG_DIR)/*.tgz 2> /dev/null || \
echo 1) | \
sed -e 's/.tgz//' | \
awk 'BEGIN {FS="-"} ; {print $$NF}' | sort | tail -1))

PATCH_NR = \
$(strip $(shell (ls $(KERNEL_PATCH_PKG_DIR)/*.tgz 2> /dev/null || \
echo 0) | \
sed -e 's/.tgz//' | \
awk 'BEGIN {FS="-"} ; {print $$NF}' | sort | tail -1 | \
xargs echo 1+ | bc ))
PREV_PATCH_PKG_FILE= \
kernel-patches-$(KERNEL_VERSION)-x86_64-$(PREV_PATCH_NR).tgz
KERNEL_PATCH_PKG_FILE = \
kernel-patches-$(KERNEL_VERSION)-x86_64-$(PATCH_NR).tgz
PREV_PATCH_PKG = $(KERNEL_PATCH_PKG_DIR)/$(PREV_PATCH_PKG_FILE)
KERNEL_PATCH_PKG= \
$(shell pwd)/$(KERNEL_PATCH_PKG_DIR)/$(KERNEL_PATCH_PKG_FILE)

# Clean up kernel build directory
all: /var/tmp/dvd_install.iso
$(RM) -r $(KERNEL_BUILD_DIR) $(PKG_BUILD_DIR)

# Only one kernel can be built at a time
.NOTPARALLEL:

/var/tmp/dvd_install.iso: nfs_install.iso isolinux/setpkg.nfs \
$(filter-out $(wildcard /var/tmp), \
/var/tmp) \
$(wildcard slackware64/*/*) \
$(PREV_PATCH_PKG)
cd isolinux && ln -sf setpkg.dvd setpkg && cd ..
mkisofs -o $@ \
-R -J -V "My $(DISTRO_NAME) `date +%y%m%d`" \
-hide-rr-moved -f\
-v -d -N -no-emul-boot -boot-load-size 4 -boot-info-table \
-sort isolinux/iso.sort \
-b isolinux/isolinux.bin \
-c isolinux/isolinux.boot \
-x initrd_src \
-x old \
-A "My $(DISTRO_NAME) Install DVD" .
echo $@ created

/var/tmp:
mkdir -p $@

nfs_install.iso: isolinux/isolinux.cfg \
isolinux/message.txt \
isolinux/initrd.img \
isolinux/setpkg.nfs \
$(wildcard isolinux/*.img isolinux/*.dsk)
cd isolinux && ln -sf setpkg.nfs setpkg && cd ..
mkisofs -o $@ \
-R -J -V "My $(DISTRO_NAME) NFS `date +%y%m%d`" \
-hide-rr-moved -f\
-v -d -N -no-emul-boot -boot-load-size 4 -boot-info-table \
-sort isolinux/iso.sort \
-b isolinux/isolinux.bin \
-c isolinux/isolinux.boot \
-x slackware64 \
-x nfs_install.iso \
-x initrd_src \
-A "My $(DISTRO_NAME) NFS install CD" .

isolinux/isolinux.cfg: isolinux/isolinux.cfg.start isolinux/message.txt
cp $@.start $@
for KERNEL in $(KERNELS); do \
echo "label $$KERNEL" >> $@; \
echo "kernel /kernels/$$KERNEL/bzImage" >> $@; \
echo -n "append initrd=initrd.img load_ramdisk=1 " >> $@; \
echo "prompt_ramdisk=0 rw SLACK_KERNEL=$$KERNEL" >> $@; \
done

isolinux/message.txt: isolinux/message.txt.start $(BZIMAGES)
cp $@.start $@
echo $(KERNELS) | fold -s >> $@

isolinux/initrd.img: initrd_src $(shell find initrd_src -type d -o -type
f )
cd $< && find . | cpio -o -H newc | gzip > ../$@

initrd_src:
ifeq ($(shell whoami),root)
mkdir $@ && cd $@ && gzip -d < ../isolinux/initrd.img | cpio -i
else
@echo Run \"make initrd_src\" as root! && false
endif
slack_dirs:
find slackware64 -type l -exec $(RM) {} \;
cd slackware64 && \
ln -s $(foreach DIR, $(PACKAGE_DIRS), ../../slackware64/$(DIR)) .

kernels/%/bzImage: $(KERNEL_BUILD_DIR) kernels/%/config
echo Compiling $@
cp $(@D)/config $</.config
cd $< && make bzImage
$(RM) $(@D)/System.map.gz
cp $</arch/x86_64/boot/bzImage $@
cp $</System.map $(@D)
gzip -9 $(@D)/System.map

$(KERNEL_BUILD_DIR): $(LINUX_SRC) $(wildcard kernels/*/config) $(PATCHES)
mkdir -p $(@D)
cat $< | xzcat | (cd $(@D) && tar -xvf -)
$(foreach PATCH, $(PATCHES), \
cat $(PATCH) | (cd $@ && patch -p1) &&) true;

$(PREV_PATCH_PKG): $(BZIMAGES) kernel_and_patches/doinst.sh
( echo " Patched kernel" && echo && \
tail -9 kernel_and_patches/patches.txt | \
awk '{$$1=""; print $$0}' && printf "\n\n\n\n\n\n\n\n\n\n" ) | \
sed -e 's/^/kernel-patches:/' | head -11 > \
$(KERNEL_PATCH_PKG:%.tgz=%.txt)
mkdir -p $(PKG_BUILD_DIR)/install/new_kernels
cp -rp $(KERNELS:%=kernels/%) $(PKG_BUILD_DIR)/install/new_kernels
cp kernel_and_patches/doinst.sh $(PKG_BUILD_DIR)/install
cd $(PKG_BUILD_DIR) && /sbin/makepkg -c n $(KERNEL_PATCH_PKG)
-8<------------------------

As posting a Makefile like above loses important formatting like tabs I
have also uploaded the file to http://poolhem.se/files/Makefile

This is one big does-it-all Makefile for creating a custom Slackware
installation DVD-iso. It also creates a CD-iso for NFS installs.

The interesting parts now are the targets

initrd_src:

Which unpacks initrd.img with the command

mkdir $@ && cd $@ && gzip -d < ../isolinux/initrd.img | cpio -i

The above command line expands to:

mkdir initrd_src && cd initrd_src && gzip -d < ../isolinux/initrd.img | \
cpio -i

The above command has to be run as root to get the right owners of the
files in the extracted file system. All other targets in the Makefile
should be built as an ordinary user.

Once the above is run you can customize files in the extracted directory
tree. My guess is that you will need to edit
initrd_src/usr/lib/setup/INShd

When you have a good new custom directory tree it is time to once again
create the initrd.img image file. The target in my Makefile for this is

isolinux/initrd.img: initrd_src $(shell find initrd_src -type d -o \
-type f )

The above says that initrd.img should be rebuilt if initrd_src or any file
below initrd_src is newer than initrd.img. The command to rebuild
initrd.img is:

cd $< && find . | cpio -o -H newc | gzip > ../$@

which expands to:

cd initrd_src && find . | cpio -o -H newc | gzip > ../isolinux/initrd.img

> Maybe running the install scripts in a VM would allow me to inspect the
> uncompressed files?

Yes, during installation in a VM or a real computer you can look at those
files below /usr/lib/setup
0 new messages