-
I want /var/lib/mysql/foo to NOT be linked to /KNOPPIX!!!!
I have a database in /var/lib/mysql/ When I remaster and boot new CD, the file does not get copied to the ramdisk. It remains in the READONLY directory /KNOPPIX with only a link in the ramdisk. I have seen other posts asking for a solution to this but I have not seen any good solutions posted.
I have also noticed that some of the files under /var/ are not linked but are in fact copied over to the ramdisk. Who or what determines which files get copied over? Is it based on permissions, file ownership, wha that? Somebody please help. I have to have a bootable KNOPPIX cd with our mysql databases up and running by this weekend (3/12/05.)
I have read that moving them to /home/ might solve this problem. However, given that some /var/ files are ramdisk'ed, I am sure there is a way to ramdisk my files as well.
Any helpl greatly appreciated.
Ace
-
Senior Member
registered user
According to my research, the ramdisk symlinks are created & controlled by the linuxrc script that is contained in the minirt24.gz file. See this post http://www.knoppix.net/forum/viewtopic.php?p=78447 and this post http://www.knoppix.net/forum/viewtopic.php?t=17509 where I dscuss the linuxrc file.
-
Senior Member
registered user
Try as root
rm -rf /var/lib/mysql
cp -rp /KNOPPIX/var/lib/mysql /var/lib
mysqld_safe &
once you have booted into your remastered knoppix CD
If this works you might like to look at this page
http://truth.positive-internet.com/~...0412intro.html
for some further ideas.
-
Originally Posted by
markpreston
Try as root
rm -rf /var/lib/mysql
cp -rp /KNOPPIX/var/lib/mysql /var/lib
mysqld_safe &
once you have booted into your remastered knoppix CD
If this works you might like to look at this page
http://truth.positive-internet.com/~...0412intro.html
for some further ideas.
Problem is, this CD is for the sales guys to pass around at a show.... want to make it as idiot proof as possible. When is KNOPPIX 3.8 out anyway?
-
Senior Member
registered user
From Knoppix 3.7, minirt24.gz, the linuxrc file, starting at line 611, showing how the symlinks are created.
Code:
# We need /bin/mount here for the -o size= option
/bin/mount -t tmpfs -o "size=${RAMSIZE}k" /ramdisk /ramdisk && mkdir -p /ramdisk
/home /ramdisk/var && ln -s /ramdisk/home /ramdisk/var /
echo "${BLUE}Done.${NORMAL}"
else
mkdir -p /home /var
fi
echo -n "${CRE}${BLUE}Creating directories and symlinks on ramdisk...${NORMAL}"
# Create common WRITABLE (empty) dirs
mkdir -p /var/run /var/backups /var/cache/apache /var/local /var/lock/news \
/var/nis /var/preserve /var/state/misc /var/tmp /var/lib \
/var/spool/cups/tmp /var/lib/samba /var/lib/nessus \
/mnt/cdrom /mnt/floppy /mnt/hd /mnt/test \
/home/knoppix /root /etc/sysconfig /etc/X11 /etc/cups /etc/dhcpc
chown knoppix.knoppix /home/knoppix
As for WHY the remaster links to /KNOPPIX, it is either in the linuxrc script or in the remastering scripts.
This is about as much I can help you.
James
-
I see the minirt24.gz file in my /mnt/hda1/knx/[b]master/boot/isolinux/ directory. However, when I gunzip it, I get a huge binary file. How did you extract the text file? Is this the file I should modify to change how the links are created? And if so, do I just modify and then gzip it back, before I remaster?
Thanx
Originally Posted by
UnderScore
From Knoppix 3.7, minirt24.gz, the linuxrc file, starting at line 611, showing how the symlinks are created.
Code:
# We need /bin/mount here for the -o size= option
/bin/mount -t tmpfs -o "size=${RAMSIZE}k" /ramdisk /ramdisk && mkdir -p /ramdisk
/home /ramdisk/var && ln -s /ramdisk/home /ramdisk/var /
echo "${BLUE}Done.${NORMAL}"
else
mkdir -p /home /var
fi
echo -n "${CRE}${BLUE}Creating directories and symlinks on ramdisk...${NORMAL}"
# Create common WRITABLE (empty) dirs
mkdir -p /var/run /var/backups /var/cache/apache /var/local /var/lock/news \
/var/nis /var/preserve /var/state/misc /var/tmp /var/lib \
/var/spool/cups/tmp /var/lib/samba /var/lib/nessus \
/mnt/cdrom /mnt/floppy /mnt/hd /mnt/test \
/home/knoppix /root /etc/sysconfig /etc/X11 /etc/cups /etc/dhcpc
chown knoppix.knoppix /home/knoppix
As for WHY the remaster links to /KNOPPIX, it is either in the linuxrc script or in the remastering scripts.
This is about as much I can help you.
James
-
Senior Member
registered user
> How did you extract the text file?
See the second link in my first post above. In that thread i detail how to get access to the linuxrc file. I am not copying & pasting it because you should be able to read & find it.
> Is this the file I should modify to change how the links are created?
Yes I think it is. I do not know for sure as I am not a Knoppix developer.
> And if so, do I just modify and then gzip it back, before I remaster?
Yes. Again I believe it to be correct but I do not know for sure.
-
Senior Member
registered user
You might like to consider placing an icon on the KDE Desktop for users to click and automate the commands.
This link should help, if you decide to do this:
http://www.knoppix.net/forum/viewtopic.php?t=17445
I have found the following scripts work for start-up and saving and
restoring from a USB device. Naturally I'd be very interested in any more efficient alternative solutions.
For start-up LAMP KDE Desktop icon:
sudo /KNOPPIX/usr/local/bin/startLAMP
in /etc/skel/Desktop
and
#!/bin/bash
# Start Apache and MySQL. Put toophpix database into RAM. Open Mozilla browser.
/etc/init.d/apache start
rm -rf /var/lib/mysql
cp -rp /KNOPPIX/var/lib/mysql /var/lib
mysqld_safe &
mozilla "http://127.0.0.1/Toophpix/page3.php"
goes in /KNOPPIX/usr/local/bin/ directory
I use the same directories for the USB scripts.
For save to USB the commands I am using are:
sudo /usr/local/bin/saveToUSB
and
#!/bin/bash
# Back up toophpix data to USB device.
modprobe usb-storage
mkdir /mnt/usbstore
mount -t vfat /dev/sda1 /mnt/usbstore
mysqldump --opt -u root toophpix > /mnt/usbstore/toophpix.sql
umount /mnt/usbstore
For restore from USB the commands I am using are:
sudo /usr/local/bin/restoreFromUSB
and
#!/bin/bash
# Restore MySQL toophpix database from USB device
modprobe usb-storage
mkdir /mnt/usbstore
mount -t vfat /dev/sda1 /mnt/usbstore
mysql -u root toophpix < /mnt/usbstore/toophpix.sql
umount /mnt/usbstore
The umount commands at the end help ensure that the USB device can be
mounted if the user clicks on the
Desktop icon (Hard-Disk Partition sda1) that appears once Knoppix has
booted up or when the USB device is identified when inserted.
toophpix is the name of the database that is backed up.
-
Senior Member
registered user
Try to add the following to the /etc/skel/init.d/knoppix-autoconfig file of the remastered distro just before starting kdm:
cp -rp /KNOPPIX/var/lib/mysql /var/lib
I am not expert in mysql so I do not know what permissions you should also add to the above. Try it, it should work.
-
Thanx for all who helped. Modifying the minirt file as suggested by UnderScore proved to be the easiest and most efficient. It also allowed me to make all kinds of other tweaks.
I am also going to play around with suggestions from knopx4me as I still need to give the marketing guys the ability to reset some databases after they tip them over "as part of their demo."
Thanx again guys.
Similar Threads
-
By PlatinumPlus in forum Hdd Install / Debian / Apt
Replies: 1
Last Post: 10-06-2005, 10:17 AM
-
By ilovelinux98 in forum Customising & Remastering
Replies: 2
Last Post: 04-25-2005, 08:27 AM
-
By ilovelinux98 in forum MS Windows & New to Linux
Replies: 0
Last Post: 04-23-2005, 09:30 PM
-
By Coume in forum General Support
Replies: 5
Last Post: 08-06-2003, 06:42 AM
-
By antti in forum General Support
Replies: 1
Last Post: 02-10-2003, 02:16 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
A-Tech 8GB DDR3 1600 PC3-12800 Laptop SODIMM 204-Pin Memory RAM PC3L DDR3L 1x 8G
$13.99
Samsung 16GB 2Rx4 PC4-2133P DDR4-17000 1.2V RDIMM ECC Registered Server Memory
$16.29
HyperX FURY DDR3 8GB 16GB 32GB 1600 MHz PC3-12800 Desktop RAM Memory DIMM 240pin
$12.90
Corsair Vengeance LPX 32GB PC4-25600 (DDR4-3200) Memory NEVER USED LOOSE STICKS
$40.00
A-Tech 8GB PC3-12800 Desktop DDR3 1600 MHz Non ECC 240-Pin DIMM Memory RAM 1x 8G
$13.99
Kingston HyperX FURY DDR3 8GB 16GB 32G 1600 1866 1333 Desktop Memory RAM DIMM
$13.25
A-Tech 16GB 2 x 8GB PC3-12800 Laptop SODIMM DDR3 1600 Memory RAM PC3L 16G DDR3L
$27.98
A-Tech 16GB 2x 8GB PC3-12800 Desktop DDR3 1600 MHz 240pin DIMM Memory RAM 16G 8G
$27.98
A-Tech 256GB 4x 64GB 4Rx4 PC4-19200 ECC Load Reduced LRDIMM Server Memory RAM
$287.96
A-Tech 64GB 4x 16GB 2Rx4 PC4-17000R DDR4 2133MHz ECC REG RDIMM Server Memory RAM
$87.96