Not as simple as it first seems.
INs are divided into two categories. The earlier North aligned platforms are just as they sound. A platform which has the gyros and accelerometers mounted on it, finds true north during alignment (don't ask me how!) which can take up to 15 minutes and maintains this throughout it's operation. These platforms are not cleared for polar flight as the rate of heading change as you flew over of close to the pole is too much for the instrument to handle.
Later INs, the carousel for example, do nor align to true North. the carousel actually rotates slowly in an attempt to reduce it's wander error. Again, I don't know how it finds or maintains true North, but I seem to remember one aircraft I flew which had a Carousel fitted did have an input from the compass system..
IRSs use laser ring gyros. earlier ones (the Honeywells fitted to Boeings) employ accelerometers but later ones (such as Litton 92s) compute acceleration from the information derived from the lasers. Both compute true North during alignment, but the reference is an electronic one derived from the software.
INs were developed for the US space program. The INs fitted to the Apollo capsules used gyros to align, then when the capsule was on a steady tradgectory, the gyros were rundown to save power and the platform was then kept aligned optically by a device which tracked stars. I gather the attitude and heading reference it used was a arbitary one perpendicular to Houston. at a certain time of day.
I'm willing to be corrected on any of the above.